Skip to content

chore: Never run v2 migrations on v1 database #6438

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

Merged
merged 1 commit into from
Mar 6, 2023
Merged

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Mar 3, 2023

Just detect migration_cursor which is used in v1.

$ go install && coder server --postgres-url postgresql://postgres:postgres@localhost:5432/postgres\?sslmode=disable                                                 02:23:17 PM
Coder v0.0.0-devel+8d07969 - Software development on your infrastucture
Started HTTP listener at http://127.0.0.1:3000
Opening tunnel so workspaces can connect to your deployment. For production scenarios, specify an external access URL

View the Web UI: https://fcca5eb9087a599c0cb643b264752ea5.pit-1.try.coder.app
connect to postgres: migrate up: migrate setup: currently connected to a Coder v1 database, aborting database setup. Coder v2 cannot be installed over an existing v1 database.
Run 'coder server --help' for usage.                               

fixes #6245

@Emyrk Emyrk requested review from coadler and a team March 3, 2023 20:24
@Emyrk Emyrk merged commit 8a6635b into main Mar 6, 2023
@Emyrk Emyrk deleted the stevenmasley/detect_v1_db branch March 6, 2023 19:49
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.

coder should fail to start if deployed over v1 database
2 participants