19 lines
460 B
TypeScript
19 lines
460 B
TypeScript
import type { Knex } from "knex";
|
|
|
|
|
|
export async function up(knex: Knex): Promise<void> {
|
|
return knex.schema.createTable("music", (table) => {
|
|
table.increments("musicid", { primaryKey: true });
|
|
table.string("ytlink", 255);
|
|
table.integer("userid");
|
|
table.foreign("userid").references("userid").inTable("users");
|
|
table.timestamps(true, true);
|
|
});
|
|
}
|
|
|
|
|
|
export async function down(knex: Knex): Promise<void> {
|
|
return knex.schema.dropTable("music");
|
|
}
|
|
|