xud
Version:
Exchange Union Daemon
31 lines • 1.79 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const sequelize_1 = require("sequelize");
/**
* An ordered array of functions that will migrate the database from one
* version to the next. The 1st element (index 0) will migrate from version
* 0 to 1, the 2nd element will migrate from version 1 to 2, and so on...
* Each migration must be called in order and allowed to complete before
* calling the next.
*/
const migrations = [];
migrations[0] = (sequelize) => __awaiter(void 0, void 0, void 0, function* () {
yield sequelize.getQueryInterface().createTable('passwords', {
id: { type: sequelize_1.DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
encryptedPassword: { type: sequelize_1.DataTypes.STRING, allowNull: false },
currency: { type: sequelize_1.DataTypes.STRING(5), allowNull: true },
swapClient: { type: sequelize_1.DataTypes.TINYINT, allowNull: false },
createdAt: { type: sequelize_1.DataTypes.BIGINT, allowNull: false },
});
});
exports.default = migrations;
//# sourceMappingURL=migrations.js.map