Created
May 14, 2020 08:45
-
-
Save urcoilbisurco/fddbbb9ba02cb66c50b6dc0b8104471b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Schema } from "https://deno.land/x/nessie/mod.ts"; | |
export const up = (scema: Schema): void => { | |
scema.create("users", (table) => { | |
table.id(); | |
table.string("name", 100).nullable(); | |
table.boolean("is_true").default("false"); | |
table.custom("custom_column int default 1"); | |
table.timestamps(); | |
}); | |
scema.queryString( | |
"INSERT INTO users VALUES (DEFAULT, 'Deno', true, 2, DEFAULT, DEFAULT);", | |
); | |
}; | |
export const down = (schema: Schema): void => { | |
schema.drop("users"); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment