mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
refactor: relocate db scripts
This commit is contained in:
parent
9d4c08e460
commit
409d0c4ffd
2
.gitignore
vendored
2
.gitignore
vendored
@ -62,8 +62,6 @@ package-lock.json
|
||||
.node-version
|
||||
.nvmrc
|
||||
!.gitkeep
|
||||
/start.json
|
||||
/migrate.js
|
||||
|
||||
# User directories (renders)
|
||||
/public/render/**/original
|
||||
|
@ -1,4 +1,4 @@
|
||||
const init = async db => {
|
||||
const initDatabase = async db => {
|
||||
// Create the tables we need to store galleries and files
|
||||
await db.schema.hasTable('albums').then(exists => {
|
||||
if (!exists) {
|
||||
@ -63,10 +63,10 @@ const init = async db => {
|
||||
password: hash,
|
||||
token: require('randomstring').generate(64),
|
||||
timestamp,
|
||||
permission: require('./../controllers/permissionController').permissions.superadmin,
|
||||
permission: require('./../permissionController').permissions.superadmin,
|
||||
registration: timestamp
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = init
|
||||
module.exports = initDatabase
|
@ -21,7 +21,7 @@
|
||||
"watch": "gulp watch",
|
||||
"develop": "env NODE_ENV=development gulp watch",
|
||||
"dev": "env NODE_ENV=development gulp watch",
|
||||
"migrate": "node ./database/migration.js",
|
||||
"migrate": "node ./scripts/migrate.js",
|
||||
"bump-versions": "node ./scripts/bump-versions.js",
|
||||
"cf-purge": "node ./scripts/cf-purge.js",
|
||||
"clean-up": "node ./scripts/clean-up.js",
|
||||
|
Loading…
Reference in New Issue
Block a user