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

Schema DDL: placeholder for supporting migration cases #241

Closed
chuwy opened this issue Mar 15, 2017 · 3 comments
Closed

Schema DDL: placeholder for supporting migration cases #241

chuwy opened this issue Mar 15, 2017 · 3 comments

Comments

@chuwy
Copy link
Contributor

chuwy commented Mar 15, 2017

Migrated from snowplow-archive/schema-guru#140

@chuwy
Copy link
Contributor Author

chuwy commented Jul 5, 2017

From original ticket:

Here I'm collecting possible Schema-migrations and ways to handle it

  1. New optional property (column) added. Addition. Will be implemented in 0.6.0.
ALTER TABLE ADD COLUMN ... NULL
  1. Property become nullable. Revision. See igluctl: support REVISION migration for properties becoming nullable #238
ALTER TABLE ADD COLUMN customer_id_new string null;
INSERT INTO customer_id_new SELECT from customer_id;
ALTER TABLE DROP COLUMN customer_id;
ALTER TABLE RENAME COLUMN customer_id_new TO customer_id
END TRANSACTION;
  1. Property become union-type: string -> [string, number]. Revision. See Schema DDL: support REVISION migration into string/number union type #243

  2. A default is added to a property (Addition)

  3. A minimum and/or maximum value is removed from a numeric (Revision)

  4. New required field added (Model)

  5. Property widened (Addition)

@alexanderdean
Copy link
Member

  1. New required field added with default (Revision?)

@aldemirenes
Copy link

Migrated to snowplow/schema-ddl#32

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

No branches or pull requests

3 participants