aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r--server/initializers/migrations/0005-email-pod.js20
-rw-r--r--server/initializers/migrations/0005-example.js14
2 files changed, 20 insertions, 14 deletions
diff --git a/server/initializers/migrations/0005-email-pod.js b/server/initializers/migrations/0005-email-pod.js
new file mode 100644
index 000000000..d90b674a1
--- /dev/null
+++ b/server/initializers/migrations/0005-email-pod.js
@@ -0,0 +1,20 @@
1/*
2 This is just an example.
3*/
4
5// utils = { transaction, queryInterface }
6exports.up = function (utils, callback) {
7 const q = utils.queryInterface
8 const Sequelize = utils.Sequelize
9
10 const data = {
11 type: Sequelize.STRING(400),
12 allowNull: false
13 }
14
15 q.addColumn('Pods', 'email', data, { transaction: utils.transaction }).asCallback(callback)
16}
17
18exports.down = function (options, callback) {
19 throw new Error('Not implemented.')
20}
diff --git a/server/initializers/migrations/0005-example.js b/server/initializers/migrations/0005-example.js
deleted file mode 100644
index cedc42919..000000000
--- a/server/initializers/migrations/0005-example.js
+++ /dev/null
@@ -1,14 +0,0 @@
1// /*
2// This is just an example.
3// */
4
5// const db = require('../database')
6
7// // options contains the transaction
8// exports.up = function (options, callback) {
9// db.Application.create({ migrationVersion: 42 }, { transaction: options.transaction }).asCallback(callback)
10// }
11
12// exports.down = function (options, callback) {
13// throw new Error('Not implemented.')
14// }