first commit

This commit is contained in:
Jeannette Chin
2024-10-21 17:09:40 +01:00
commit 58f45f8947
15 changed files with 1964 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = function (knex) {
return knex.schema.createTable("subscribers", (table) => {
table.increments("id");
table.string("firstname", 50).notNullable().defaultTo("");
table.string("lastname", 50).notNullable().defaultTo("");
table.string("email", 100).notNullable().defaultTo("");
table.timestamps(true, true);
});
};
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = function (knex) {
return knex.schema.dropTable("subscribers");
};

View File

@@ -0,0 +1,21 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = function (knex) {
return knex.schema.createTable("users", (table) => {
table.increments("id");
table.string("firstname", 50).notNullable().defaultTo("");
table.string("lastname", 50).notNullable().defaultTo("");
table.string("email", 100).notNullable().defaultTo("");
table.timestamps(true, true);
});
};
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = function (knex) {
return knex.schema.dropTable("users");
};

View File

@@ -0,0 +1,15 @@
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.up = function(knex) {
};
/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
exports.down = function(knex) {
};