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

Can't deploy: ERROR: column "id" of relation "setting" already exists #6165

Closed
pdurbin opened this issue Sep 12, 2019 · 5 comments · Fixed by #6166
Closed

Can't deploy: ERROR: column "id" of relation "setting" already exists #6165

pdurbin opened this issue Sep 12, 2019 · 5 comments · Fixed by #6166
Milestone

Comments

@pdurbin
Copy link
Member

pdurbin commented Sep 12, 2019

Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException:
Migration V4.16.0.1__5303-addColumn-to-settingTable.sql failed

SQL State : 42701
Error Code : 0
Message : ERROR: column "id" of relation "setting" already exists
Location : db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql (/usr/local/glassfish4/glassfish/domains/domain1/applications/da
taverse/WEB-INF/classes/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql)
Line : 3
Statement : ALTER TABLE setting ADD COLUMN ID SERIAL PRIMARY KEY

@pdurbin
Copy link
Member Author

pdurbin commented Sep 12, 2019

I'm on 6dd0cfc but I suspect others might be affected (on "develop" for example) if they drop their database like I just did.

I believe the fix is our (new) usual "IF NOT EXISTS" fix. Does that sound right @scolapasta @landreev ?

@pdurbin pdurbin self-assigned this Sep 12, 2019
@pdurbin
Copy link
Member Author

pdurbin commented Sep 12, 2019

This one too:

Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException:
Migration V4.16.0.1__5303-addColumn-to-settingTable.sql failed

SQL State : 42701
Error Code : 0
Message : ERROR: column "lang" of relation "setting" already exists
Location : db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql (/usr/local/glassfish4/glassfish/domains/domain1/applications/dataverse/WEB-INF/classes/db/migration/V4.16.0.1__5303-addColumn-to-settingTable.sql)
Line : 5
Statement : ALTER TABLE setting ADD COLUMN lang text

@pdurbin
Copy link
Member Author

pdurbin commented Sep 12, 2019

Same trouble on phoenix on "develop". Can't deploy. It's on 9f41601. Here's a screenshot:

Screen Shot 2019-09-12 at 6 05 37 PM

@pdurbin
Copy link
Member Author

pdurbin commented Sep 12, 2019

I just made pull request #6166 and I think new installations won't work without a fix like this.

@pdurbin pdurbin removed their assignment Sep 12, 2019
@pdurbin
Copy link
Member Author

pdurbin commented Sep 12, 2019

Oh, and API tests on phoenix are down because the war file can't be deployed:

Screen Shot 2019-09-12 at 6 15 39 PM

kcondon added a commit that referenced this issue Sep 13, 2019
get deployment working again for new installations #6165
@pdurbin pdurbin added this to the 4.17 milestone Oct 12, 2019
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.

1 participant