aboutsummaryrefslogtreecommitdiffstats
path: root/db/init/update.sql
diff options
context:
space:
mode:
authorRan Guin <[email protected]>2021-07-19 12:19:44 -0700
committerRan Guin <[email protected]>2021-07-19 12:19:44 -0700
commit16a6651ec583e8fcc91073095467420eb32576ff (patch)
tree5d8a1882515af6d29f106644143a1e14a5d6074e /db/init/update.sql
parente238eab45f1f5b6f3dbf40ddff59b9db804ffb4f (diff)
downloadcoinos-server-16a6651ec583e8fcc91073095467420eb32576ff.tar.gz
coinos-server-16a6651ec583e8fcc91073095467420eb32576ff.zip
add data update
Diffstat (limited to 'db/init/update.sql')
-rw-r--r--db/init/update.sql6
1 files changed, 5 insertions, 1 deletions
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;