Skip to content

Instantly share code, notes, and snippets.

@peaceintheheart
Created December 16, 2020 16:23
Show Gist options
  • Save peaceintheheart/07273cf10ba3b028354d0abd75ff420e to your computer and use it in GitHub Desktop.
Save peaceintheheart/07273cf10ba3b028354d0abd75ff420e to your computer and use it in GitHub Desktop.
Correct the migration scripts
// 006
CREATE TABLE payment_summaries (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
course_id INTEGER REFERENCES bootcamp_courses(id),
monthly FLOAT,
up_front FLOAT,
interest_only_loan TEXT,
immediate_repayment_loan TEXT,
isa TEXT
);
// 009
CREATE TABLE course_languages (
course_id INTEGER REFERENCES bootcamp_courses(id),
language_id INTEGER REFERENCES languages(id),
PRIMARY KEY (course_id, language_id)
);
// 010
CREATE TABLE course_frameworks (
course_id INTEGER REFERENCES bootcamp_courses(id),
framework_id INTEGER REFERENCES frameworks(id),
PRIMARY KEY (course_id, framework_id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment