aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/20190609161116_create_updates_table.js
diff options
context:
space:
mode:
authorSin-MacBook <[email protected]>2020-08-10 23:44:20 +0200
committerSin-MacBook <[email protected]>2020-08-10 23:44:20 +0200
commit2a53887abba882bf7b63aeda8dfa55fdb3ab8792 (patch)
treead7a95eb41faa6ff13c3142285cdc0eb3ca92183 /db/migrations/20190609161116_create_updates_table.js
downloadmodmail-2a53887abba882bf7b63aeda8dfa55fdb3ab8792.tar.xz
modmail-2a53887abba882bf7b63aeda8dfa55fdb3ab8792.zip
clean this up when home
Diffstat (limited to 'db/migrations/20190609161116_create_updates_table.js')
-rw-r--r--db/migrations/20190609161116_create_updates_table.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrations/20190609161116_create_updates_table.js b/db/migrations/20190609161116_create_updates_table.js
new file mode 100644
index 0000000..c90e9bd
--- /dev/null
+++ b/db/migrations/20190609161116_create_updates_table.js
@@ -0,0 +1,14 @@
+exports.up = async function(knex, Promise) {
+ if (! await knex.schema.hasTable('updates')) {
+ await knex.schema.createTable('updates', table => {
+ table.string('available_version', 16).nullable();
+ table.dateTime('last_checked').nullable();
+ });
+ }
+};
+
+exports.down = async function(knex, Promise) {
+ if (await knex.schema.hasTable('updates')) {
+ await knex.schema.dropTable('updates');
+ }
+};