From 86f68cfa370ab1b80941c0434d2ee59ce6249af1 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sun, 1 Sep 2019 19:57:49 +1000 Subject: [PATCH] merge contact settings and user tables --- setup.sql | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/setup.sql b/setup.sql index ee66665..b16da27 100644 --- a/setup.sql +++ b/setup.sql @@ -2,15 +2,11 @@ USE `fedibooks`; CREATE TABLE IF NOT EXISTS `users` ( `id` INT AUTO_INCREMENT PRIMARY KEY, `email` VARCHAR(128) UNIQUE NOT NULL, - `password` BINARY(60) NOT NULL -) ENGINE=INNODB; -CREATE TABLE IF NOT EXISTS `contact_settings` ( - `user_id` INT NOT NULL, + `password` BINARY(60) NOT NULL, `fetch` ENUM('always', 'once', 'never') DEFAULT 'once', `submit` ENUM('always', 'once', 'never') DEFAULT 'once', `generation` ENUM('always', 'once', 'never') DEFAULT 'once', - `reply` ENUM('always', 'once', 'never') DEFAULT 'once', - FOREIGN KEY (`user_id`) REFERENCES users(id) ON DELETE CASCADE + `reply` ENUM('always', 'once', 'never') DEFAULT 'once' ) ENGINE=INNODB; CREATE TABLE IF NOT EXISTS `credentials` ( `id` INT AUTO_INCREMENT PRIMARY KEY,