Skip to content

What is recommended way to manage versioned migration with atlas? #1495

Answered by rotemtam
wangmir asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, when we start from an existing database, how can I generate a "declarative schema" from this?

The best way is to use atlas schema inspect -u <URL> to get the HCL representation.
If you prefer using a UI for this, you can use https://gh.atlasgo.cloud/explore:

  • Paste the SQL representing your schema (be sure to select the correct database dialect)
  • Click "Visualize"
  • Use the select box to choose HCL
  • Atlas Cloud will translate your SQL to HCL.

As this is a one time operation, I think both are good options.
Btw, you can also use an SQL file as the desired state of your database, if you prefer.

Who is responsible for generating the migration script?

At our company, the develop…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by a8m
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants