From 18814242ad055ecd6f9de1d23209958e12aee69c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 24 Sep 2021 02:19:30 -0400 Subject: always create account on issuance --- db/migrations/20210814193811_fix_db_conflicts.js | 16 ---------------- db/migrations/20210821013757_cull_usernames.js | 11 ----------- 2 files changed, 27 deletions(-) delete mode 100644 db/migrations/20210814193811_fix_db_conflicts.js delete mode 100644 db/migrations/20210821013757_cull_usernames.js (limited to 'db') diff --git a/db/migrations/20210814193811_fix_db_conflicts.js b/db/migrations/20210814193811_fix_db_conflicts.js deleted file mode 100644 index 37ff2bbc..00000000 --- a/db/migrations/20210814193811_fix_db_conflicts.js +++ /dev/null @@ -1,16 +0,0 @@ - -exports.up = function(knex) { - return Promise.all([ - knex.raw("UPDATE waiting_list set created_at = '2021-01-01', updated_at='2021-01-01' WHERE updated_at IS NULL OR created_at IS NULL"), - knex.raw("ALTER TABLE waiting_list MODIFY created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP"), - knex.raw("ALTER TABLE waiting_list MODIFY updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP"), - - knex.raw("UPDATE referrals set created_at = '2021-01-01', updated_at='2021-01-01' WHERE updated_at IS NULL OR created_at IS NULL"), - knex.raw("ALTER TABLE referrals MODIFY created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP"), - knex.raw("ALTER TABLE referrals MODIFY updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP") - ]) -}; - -exports.down = function(knex) { - -}; diff --git a/db/migrations/20210821013757_cull_usernames.js b/db/migrations/20210821013757_cull_usernames.js deleted file mode 100644 index 5d2a4672..00000000 --- a/db/migrations/20210821013757_cull_usernames.js +++ /dev/null @@ -1,11 +0,0 @@ - -exports.up = function(knex) { - return Promise.all([ - knex.raw("UPDATE users SET username = REPLACE(username, ' ', '')"), // just in case valid users have trailing spaces in their username - knex.raw("DELETE FROM users WHERE !(username REGEXP '^[a-zA-Z0-9\.\_\@\-]{3,32}$')"), - ]) -}; - -exports.down = function(knex) { - -}; -- cgit v1.2.3