Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Support .yml extension in migration names, add Travis config #35

Merged
merged 10 commits into from
Dec 3, 2018

Conversation

viviag
Copy link
Contributor

@viviag viviag commented Sep 13, 2018

Partly covers changes, mentioned in discussion on #34

@viviag
Copy link
Contributor Author

viviag commented Sep 18, 2018

PR is ready for review.

@jtdaugherty
Copy link
Owner

Thanks for the patches. I seem to recall you mentioning that the move to ByteString was motivated by performance. Did you consider Text instead? A lot of the values that are now ByteStrings really should not be byte strings, but rather Text values (e.g. migration names and even contents).

@viviag
Copy link
Contributor Author

viviag commented Sep 19, 2018

Fair enough. Thanks for review; I'm going to revisit string types in one-two days.

Exceptions:
 - String is the only serialization data type supported by HDBC
 - FilePaths
@viviag
Copy link
Contributor Author

viviag commented Sep 21, 2018

Fixed.

test-suite dbmigrations-tests
default-language: Haskell2010
default-extensions: OverloadedStrings
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move this to the relevant modules with explicit pragmas?

getFields (YMap mp) = map toPair $ Map.assocs mp
where
toPair (YStr k, YStr v) = (unpack k, unpack v)
toPair (YStr k, YStr v) = (T.decodeUtf8 k, T.decodeUtf8 v)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to this change, can you also update MOO.TXT to mention that migrations are assumed to be UTF-8 encoded?

@viviag
Copy link
Contributor Author

viviag commented Sep 22, 2018

Fixed.

@jtdaugherty
Copy link
Owner

Okay, these changes look okay to me. Have you tried them with the backend-specific wrappers? If not, please ensure that those have update patches, too.

https://github.com/jtdaugherty/dbmigrations-postgresql
https://github.com/jtdaugherty/dbmigrations-sqlite
https://github.com/jtdaugherty/dbmigrations-mysql

@viviag
Copy link
Contributor Author

viviag commented Sep 24, 2018

jtdaugherty/dbmigrations-mysql#2

Two other tools are up to date.

@jtdaugherty jtdaugherty merged commit 80336a7 into jtdaugherty:master Dec 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants