aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-02-16 19:19:56 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-02-16 19:19:56 +0100
commit4793c343fd3cde3c6282ed0fb38e039b4276de0e (patch)
tree566856a8d0bee0ee06e60c5e3bf6b998135a078a /server/initializers/migrations
parent3266ad7cf8ff10d0fdae456196eff1653cc7ac21 (diff)
downloadPeerTube-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.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// }