31 lines
610 B
JavaScript
31 lines
610 B
JavaScript
"use strict";
|
|
|
|
let dbm;
|
|
let type;
|
|
let seed;
|
|
|
|
/**
|
|
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
* This enables us to not have to rely on NODE_PATH.
|
|
*/
|
|
exports.setup = function (options, seedLink) {
|
|
dbm = options.dbmigrate;
|
|
type = dbm.dataType;
|
|
seed = seedLink;
|
|
};
|
|
|
|
exports.up = function (db) {
|
|
return db.createTable("csrf_token", {
|
|
id: {type: "int", primaryKey: true, autoIncrement: true},
|
|
url: "string",
|
|
created_at: "int",
|
|
});
|
|
};
|
|
|
|
exports.down = function (db) {
|
|
return db.dropTable("csrf_token");
|
|
};
|
|
|
|
exports._meta = {
|
|
version: 1,
|
|
};
|