Skip to content

Add support for custom types, such as Enums in Postgresql #7

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

Closed
rocket-3 opened this issue May 31, 2021 · 4 comments · Fixed by #14
Closed

Add support for custom types, such as Enums in Postgresql #7

rocket-3 opened this issue May 31, 2021 · 4 comments · Fixed by #14
Labels
enhancement New feature or request

Comments

@rocket-3
Copy link
Collaborator

rocket-3 commented May 31, 2021

DbGit don't restore custom types, either don't even save them
This problem is described in DbGitIntegrationTestBasic.dbToDbRestoreWithCustomTypes test that uses pagilla database from test DBMS

@rocket-3 rocket-3 added the enhancement New feature or request label May 31, 2021
Repository owner deleted a comment from rultor Jun 1, 2021
@rocket-3
Copy link
Collaborator Author

rocket-3 commented Jun 1, 2021

@rultor deploy, tests=*IntegrationTest*#*CustomTypes*

@rultor
Copy link

rultor commented Jun 1, 2021

@rultor deploy, tests=*IntegrationTest*#*CustomTypes*

@rocket-3 OK, I'll try to deploy now. You can check the progress here

@rultor
Copy link

rultor commented Jun 1, 2021

@rultor deploy, tests=*IntegrationTest*#*CustomTypes*

@rocket-3 Oops, I failed. You can see the full log here (spent 3min)

|   >         Restoring table public/film.tbl ...
|   >             Creating table... OK
|   >             Adding columns...00:03 ERROR [App.java:41] : Error execute dbgit
|   > ru.fusionsoft.dbgit.core.ExceptionDBGitRestore: Restore objects error
|   >   at ru.fusionsoft.dbgit.adapters.DBAdapter.restoreDataBase(DBAdapter.java:160)
|   >   at ru.fusionsoft.dbgit.core.GitMetaDataManager.restoreDataBase(GitMetaDataManager.java:378)
|   >   at ru.fusionsoft.dbgit.command.CmdRestore.execute(CmdRestore.java:183)
|   >   at ru.fusionsoft.dbgit.App.executeDbGitCommand(App.java:57)
|   >   at ru.fusionsoft.dbgit.App.main(App.java:29)
|   > Caused by: ru.fusionsoft.dbgit.core.ExceptionDBGitRestore: Error restore public/film.tbl
|   >   at ru.fusionsoft.dbgit.postgres.DBRestoreTablePostgres.restoreTablePostgres(DBRestoreTablePostgres.java:124)
|   >   at ru.fusionsoft.dbgit.postgres.DBRestoreTablePostgres.restoreMetaObject(DBRestoreTablePostgres.java:38)
|   >   at ru.fusionsoft.dbgit.adapters.DBAdapter.restoreDataBase(DBAdapter.java:140)
|   >   ... 4 common frames omitted
|   > Caused by: ru.fusionsoft.dbgit.core.ExceptionDBGit: Error restore public/film.tbl#rating
|   >   at ru.fusionsoft.dbgit.postgres.DBRestoreTablePostgres.restoreTableFields(DBRestoreTablePostgres.java:355)
|   >   at ru.fusionsoft.dbgit.postgres.DBRestoreTablePostgres.restoreTablePostgres(DBRestoreTablePostgres.java:112)
|   >   ... 6 common frames omitted
|   > Caused by: org.postgresql.util.PSQLException: ERROR: type "mpaa_rating" does not exist
|   >   Position: 43
|   >   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
|   >   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
|   >   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
|   >   at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
|   >   at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
|   >   at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
|   >   at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
|   >   at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
|   >   at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
|   >   at ru.fusionsoft.dbgit.statement.StatementLogging.execute(StatementLogging.java:178)
|   >   at ru.fusionsoft.dbgit.postgres.DBRestoreTablePostgres.addColumn(DBRestoreTablePostgres.java:525)
|   >   at ru.fusionsoft.dbgit.postgres.DBRestoreTablePostgres.restoreTableFields(DBRestoreTablePostgres.java:300)
|   >   ... 7 common frames omitted
|   java.lang.Exception: Process exited with error, code 1

@rocket-3
Copy link
Collaborator Author

#14 (comment)

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

Successfully merging a pull request may close this issue.

2 participants