Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration with is not idempotent when combining default=null and Maybe type #1534

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

danbroooks
Copy link
Contributor

@danbroooks danbroooks commented May 22, 2024

Recreation for issue described in #1535


Before submitting your PR, check that you've:

  • Documented new APIs with Haddock markup
  • Added @since declarations to the Haddock
  • Ran stylish-haskell on any changed files.
  • Adhered to the code style (see the .editorconfig file for details)

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

@danbroooks danbroooks changed the title Add initial test to highlight issue Migration with is not idempotent when combining default=null and Maybe type May 22, 2024
@danbroooks danbroooks force-pushed the non-idempotent-migration-maybe-text branch from 7bd8eb2 to ea4069e Compare May 22, 2024 19:51
fit "is idempotent (default text example)" $ runDb $ do
void $ runMigrationSilent migrationWithDefaultMaybeText
again <- getMigration migrationWithDefaultMaybeText
liftIO $ again @?= ["ALTER TABLE \"text_maybe_default\" ALTER COLUMN \"field2\" SET DEFAULT null"]
Copy link
Contributor Author

@danbroooks danbroooks May 22, 2024

Choose a reason for hiding this comment

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

In this case, the test should be:

liftIO $ again @?= []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant