brainz-social-old/migrations/20231001204050-csrfTokenRelated.js

31 lines
637 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_relations", {
id: {type: "int", primaryKey: true, autoIncrement: true},
source_id: "int",
destination_id: "int",
});
};
exports.down = function (db) {
return db.dropTable("csrf_token_relations");
};
exports._meta = {
version: 1,
};