first commit
This commit is contained in:
21
db/migrations/20241021122628_create_subscribers_table.cjs
Normal file
21
db/migrations/20241021122628_create_subscribers_table.cjs
Normal 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");
|
||||
};
|
21
db/migrations/20241021123023_create_users_table.cjs
Normal file
21
db/migrations/20241021123023_create_users_table.cjs
Normal 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");
|
||||
};
|
15
db/migrations/20241021130056_create_logins_table.cjs
Normal file
15
db/migrations/20241021130056_create_logins_table.cjs
Normal 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) {
|
||||
|
||||
};
|
Reference in New Issue
Block a user