diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-13 17:46:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 17:46:23 +0100 |
commit | 91fea9fc48a4ce53dd69e0e20f5804ad95a6c27d (patch) | |
tree | 1f227acea3e9684928dedbc070cc5fa6b3af42ee /scripts | |
parent | 65b3ed25fc33c63ab2c56372c1a010541f8fddc2 (diff) | |
download | PeerTube-91fea9fc48a4ce53dd69e0e20f5804ad95a6c27d.tar.gz PeerTube-91fea9fc48a4ce53dd69e0e20f5804ad95a6c27d.tar.zst PeerTube-91fea9fc48a4ce53dd69e0e20f5804ad95a6c27d.zip |
Add migration
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/danger/clean/cleaner.ts | 4 | ||||
-rwxr-xr-x | scripts/reset-password.ts | 4 | ||||
-rwxr-xr-x | scripts/update-host.ts | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/scripts/danger/clean/cleaner.ts b/scripts/danger/clean/cleaner.ts index a22e2ed6a..009f8f7a0 100644 --- a/scripts/danger/clean/cleaner.ts +++ b/scripts/danger/clean/cleaner.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import * as Promise from 'bluebird' | 1 | import * as Promise from 'bluebird' |
2 | import * as rimraf from 'rimraf' | 2 | import * as rimraf from 'rimraf' |
3 | import { CONFIG, initDatabase, sequelizeTypescript } from '../../../server/initializers' | 3 | import { CONFIG, initDatabaseModels, sequelizeTypescript } from '../../../server/initializers' |
4 | 4 | ||
5 | initDatabase(true) | 5 | initDatabaseModels(true) |
6 | .then(() => { | 6 | .then(() => { |
7 | return sequelizeTypescript.drop() | 7 | return sequelizeTypescript.drop() |
8 | }) | 8 | }) |
diff --git a/scripts/reset-password.ts b/scripts/reset-password.ts index a6863f807..6516edc28 100755 --- a/scripts/reset-password.ts +++ b/scripts/reset-password.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as program from 'commander' | 1 | import * as program from 'commander' |
2 | import { initDatabase } from '../server/initializers' | 2 | import { initDatabaseModels } from '../server/initializers' |
3 | import { UserModel } from '../server/models/account/user' | 3 | import { UserModel } from '../server/models/account/user' |
4 | 4 | ||
5 | program | 5 | program |
@@ -11,7 +11,7 @@ if (program['user'] === undefined) { | |||
11 | process.exit(-1) | 11 | process.exit(-1) |
12 | } | 12 | } |
13 | 13 | ||
14 | initDatabase(true) | 14 | initDatabaseModels(true) |
15 | .then(() => { | 15 | .then(() => { |
16 | return UserModel.loadByUsername(program['user']) | 16 | return UserModel.loadByUsername(program['user']) |
17 | }) | 17 | }) |
diff --git a/scripts/update-host.ts b/scripts/update-host.ts index ba4656b75..eccf203ea 100755 --- a/scripts/update-host.ts +++ b/scripts/update-host.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import { getServerAccount } from '../server/helpers' | 1 | import { getServerAccount } from '../server/helpers' |
2 | import { initDatabase } from '../server/initializers' | 2 | import { initDatabaseModels } from '../server/initializers' |
3 | import { AccountFollowModel } from '../server/models/account/account-follow' | 3 | import { AccountFollowModel } from '../server/models/account/account-follow' |
4 | import { VideoModel } from '../server/models/video/video' | 4 | import { VideoModel } from '../server/models/video/video' |
5 | 5 | ||
6 | initDatabase(true) | 6 | initDatabaseModels(true) |
7 | .then(() => { | 7 | .then(() => { |
8 | return getServerAccount() | 8 | return getServerAccount() |
9 | }) | 9 | }) |