Skip to content

Instantly share code, notes, and snippets.

@tanqhnguyen
Created May 10, 2012 11:02
Show Gist options
  • Save tanqhnguyen/2652437 to your computer and use it in GitHub Desktop.
Save tanqhnguyen/2652437 to your computer and use it in GitHub Desktop.
Schemup migration
---
table: favorite
from: null
to: tan_1
depends:
- [lyrics_user, bgh_1]
- [song, bgh_16]
sql: |
CREATE TABLE favorite (
id SERIAL NOT NULL PRIMARY KEY,
user_id INTEGER NOT NULL REFERENCES lyrics_user(id) ON DELETE RESTRICT,
song_id INTEGER NOT NULL REFERENCES song(id) ON DELETE RESTRICT,
line INTEGER NOT NULL
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment