diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-02-16 19:19:56 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-02-16 19:19:56 +0100 |
commit | 4793c343fd3cde3c6282ed0fb38e039b4276de0e (patch) | |
tree | 566856a8d0bee0ee06e60c5e3bf6b998135a078a /server/initializers/migrations | |
parent | 3266ad7cf8ff10d0fdae456196eff1653cc7ac21 (diff) | |
download | PeerTube-4793c343fd3cde3c6282ed0fb38e039b4276de0e.tar.gz PeerTube-4793c343fd3cde3c6282ed0fb38e039b4276de0e.tar.zst PeerTube-4793c343fd3cde3c6282ed0fb38e039b4276de0e.zip |
Add email to pods
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r-- | server/initializers/migrations/0005-email-pod.js | 20 | ||||
-rw-r--r-- | server/initializers/migrations/0005-example.js | 14 |
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 } | ||
6 | exports.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 | |||
18 | exports.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 | // } | ||