diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-29 09:42:57 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-29 09:42:57 +0100 |
commit | efed5d5ef61cd14ee3f9ed1dda8ea8e937370405 (patch) | |
tree | 546594b658d33e24ea6a2e4f67b2b61a4bacda91 /server/initializers | |
parent | 7416fbf3359fc0b890cba3dae9661fe450604b21 (diff) | |
download | PeerTube-efed5d5ef61cd14ee3f9ed1dda8ea8e937370405.tar.gz PeerTube-efed5d5ef61cd14ee3f9ed1dda8ea8e937370405.tar.zst PeerTube-efed5d5ef61cd14ee3f9ed1dda8ea8e937370405.zip |
Add migration to delete old Authors table
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 2 | ||||
-rw-r--r-- | server/initializers/migrations/0145-delete-author.ts | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 25b2dff84..3a5a557d4 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -9,7 +9,7 @@ import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core | |||
9 | 9 | ||
10 | // --------------------------------------------------------------------------- | 10 | // --------------------------------------------------------------------------- |
11 | 11 | ||
12 | const LAST_MIGRATION_VERSION = 140 | 12 | const LAST_MIGRATION_VERSION = 145 |
13 | 13 | ||
14 | // --------------------------------------------------------------------------- | 14 | // --------------------------------------------------------------------------- |
15 | 15 | ||
diff --git a/server/initializers/migrations/0145-delete-author.ts b/server/initializers/migrations/0145-delete-author.ts new file mode 100644 index 000000000..cb23d1cc2 --- /dev/null +++ b/server/initializers/migrations/0145-delete-author.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | async function up (utils: { | ||
4 | transaction: Sequelize.Transaction, | ||
5 | queryInterface: Sequelize.QueryInterface, | ||
6 | sequelize: Sequelize.Sequelize | ||
7 | }): Promise<void> { | ||
8 | await utils.queryInterface.dropTable('Authors') | ||
9 | } | ||
10 | |||
11 | function down (options) { | ||
12 | throw new Error('Not implemented.') | ||
13 | } | ||
14 | |||
15 | export { | ||
16 | up, | ||
17 | down | ||
18 | } | ||