Skip to content

Instantly share code, notes, and snippets.

@urcoilbisurco
Created May 14, 2020 08:45
Show Gist options
  • Save urcoilbisurco/fddbbb9ba02cb66c50b6dc0b8104471b to your computer and use it in GitHub Desktop.
Save urcoilbisurco/fddbbb9ba02cb66c50b6dc0b8104471b to your computer and use it in GitHub Desktop.
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