diff options
| author | Zephyrrus <[email protected]> | 2021-01-05 22:58:41 +0200 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2021-01-07 10:47:16 +0200 |
| commit | f151a8ac3a8f944829e55fc007823b167f1a2597 (patch) | |
| tree | a6611e4ef497ee560812105c15d377364bddf1d6 /src/api/database/migrations/20190221225812_initialMigration.js | |
| parent | feat: Add experimental stats endpoint (no cache system yet) (diff) | |
| download | host.fuwn.me-f151a8ac3a8f944829e55fc007823b167f1a2597.tar.xz host.fuwn.me-f151a8ac3a8f944829e55fc007823b167f1a2597.zip | |
chore: Move statistics related functions to it's own file
fix: Extract database constructor to a separate file to ensure we only create one knex instance/db
feat: Add cron for saving the stats to the database every hour
feat: Get cached stats from database (if a stat is not found in the db, generate it)
Diffstat (limited to 'src/api/database/migrations/20190221225812_initialMigration.js')
| -rw-r--r-- | src/api/database/migrations/20190221225812_initialMigration.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/database/migrations/20190221225812_initialMigration.js b/src/api/database/migrations/20190221225812_initialMigration.js index a27a08a..a6dcbe4 100644 --- a/src/api/database/migrations/20190221225812_initialMigration.js +++ b/src/api/database/migrations/20190221225812_initialMigration.js @@ -80,6 +80,7 @@ exports.up = async knex => { table.timestamp('createdAt'); }); }; + exports.down = async knex => { await knex.schema.dropTableIfExists('users'); await knex.schema.dropTableIfExists('albums'); |