From 16a6651ec583e8fcc91073095467420eb32576ff Mon Sep 17 00:00:00 2001 From: Ran Guin Date: Mon, 19 Jul 2021 12:19:44 -0700 Subject: add data update --- db/init/update.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'db/init') diff --git a/db/init/update.sql b/db/init/update.sql index 49997c76..9412c1ee 100644 --- a/db/init/update.sql +++ b/db/init/update.sql @@ -1,4 +1,5 @@ +DROP TABLE IF EXISTS `waiting_list`; CREATE TABLE `waiting_list` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(255) DEFAULT NULL, @@ -13,11 +14,12 @@ CREATE TABLE `waiting_list` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS `referrals`; CREATE TABLE `referrals` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `token` varchar(255) DEFAULT NULL, `expiry` date DEFAULT NULL, - `status` enum('pending','active','expired','cancelled') DEFAULT NULL, + `status` enum('available', 'used', 'expired', 'cancelled') DEFAULT NULL, `sponsor_id` int(11) NOT NULL, `user_id` int(11) DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, @@ -100,6 +102,8 @@ CREATE TABLE `urls` ( --- New field changes... --- +UPDATE accounts set createdAt = '2020-01-01' where createdAt < '2020-01-01'; +UPDATE accounts set updatedAt = '2020-01-01' where createdAt < '2020-01-01'; ALTER TABLE accounts modify `contract` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL; ALTER TABLE invoices modify `tip` double NOT NULL DEFAULT 0; -- cgit v1.2.3