You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.
I need to add columns to a Document Table. What is the recommended practice to make sure the table has been created (by db.saveDoc('myTable'...)) before running the migration script that will add the columns to it?
I usually just copy out the document table DDL into my migration scripts if I need to customize them. You'll need to replace the tokens in that file: schema and table should be pretty obvious, index can be whatever you like, and pkType + pkDefault should be either SERIAL and nothing, or UUID and one of the UUID generation functions.
Migrations are out of scope for Massive, but of course you can publish whatever extensions you like to the registry :) You're right it couldn't hurt to be a little more specific about it in the docs though.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I need to add columns to a Document Table. What is the recommended practice to make sure the table has been created (by
db.saveDoc('myTable'...)
) before running the migration script that will add the columns to it?I use https://github.com/golang-migrate/migrate, a simple CLI tool that uses SQL files for migration. It doesn't have the ability to execute arbitrary scripts has part of a migration plan (yet: mattes/migrate#171).
The text was updated successfully, but these errors were encountered: