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

Latest persistent fails tests #75

Closed
tim2CF opened this issue Jan 6, 2021 · 1 comment · Fixed by #79
Closed

Latest persistent fails tests #75

tim2CF opened this issue Jan 6, 2021 · 1 comment · Fixed by #79

Comments

@tim2CF
Copy link

tim2CF commented Jan 6, 2021

Tests are failing with latest Persistent, example is here
https://github.com/coingaming/persistent-migration
Any ideas how to fix it?

persistent-migration-integration
  postgresql
    goldens
      Migrate from empty:              NOTICE:  CREATE TABLE will create implicit sequence "persistent_migration_id_seq" for serial column "persistent_migration.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "persistent_migration_pkey" for table "persistent_migration"
NOTICE:  relation "persistent_migration" already exists, skipping
NOTICE:  CREATE TABLE will create implicit sequence "city_id_seq" for serial column "city.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "city_pkey" for table "city"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index "unique_city" for table "city"
NOTICE:  CREATE TABLE will create implicit sequence "person_id_seq" for serial column "person.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "person_pkey" for table "person"
NOTICE:  CREATE TABLE will create implicit sequence "persistent_migration_id_seq" for serial column "persistent_migration.id"
FAIL (0.07s)
        user error (More migrations detected:
         * ALTER TABLE "person" ALTER COLUMN "id" TYPE INT8;
         * ALTER TABLE "city" ALTER COLUMN "id" TYPE INT8;
        )
@brandonchinn178
Copy link
Owner

brandonchinn178 commented Jan 6, 2021

Yeah, change showColumn to

showColumn :: Column -> MigrateSql
showColumn Column{..} = concatSql
  (\sqls -> Text.unwords $ [quote colName, sqlType] ++ sqls)
  $ map showColumnProp colProps
  where
    sqlType = case (AutoIncrement `elem` colProps, colType) of
      (True, SqlInt32) -> "SERIAL"
      (True, SqlInt64) -> "BIGSERIAL"
      _ -> showSqlType colType

kaldonir pushed a commit to kaldonir/persistent-migration that referenced this issue Jun 2, 2021
tfc pushed a commit to tfc/persistent-migration that referenced this issue Sep 27, 2021
Solution taken from brandonchinn178#75

Author:    kaldonir <mnapi@gmx.de>
Date:      Wed Jun 2 17:17:39 2021 +0200
tfc pushed a commit to tfc/persistent-migration that referenced this issue Sep 27, 2021
Solution taken from brandonchinn178#75

Author:    kaldonir <mnapi@gmx.de>
Date:      Wed Jun 2 17:17:39 2021 +0200
tfc pushed a commit to tfc/persistent-migration that referenced this issue Sep 27, 2021
Solution taken from brandonchinn178#75

Author:    kaldonir <mnapi@gmx.de>
Date:      Wed Jun 2 17:17:39 2021 +0200
tfc pushed a commit to tfc/persistent-migration that referenced this issue Sep 27, 2021
Solution taken from brandonchinn178#75

Author:    kaldonir <mnapi@gmx.de>
Date:      Wed Jun 2 17:17:39 2021 +0200
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 a pull request may close this issue.

2 participants