From e1a2cb8b1b25b5a0a59c8feb867eb8e1e18d7b49 Mon Sep 17 00:00:00 2001 From: Jacob Delgado Date: Wed, 15 Dec 2021 17:52:53 -0800 Subject: [PATCH] added drop database and fixed insert --- src/dbCode/fullDDL.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/dbCode/fullDDL.txt b/src/dbCode/fullDDL.txt index 714798f..2b48f50 100644 --- a/src/dbCode/fullDDL.txt +++ b/src/dbCode/fullDDL.txt @@ -1,3 +1,5 @@ +DROP DATABASE IF EXISTS Hobby; + create database Hobby; use hobby; @@ -27,6 +29,10 @@ create table users foreign key (Role) references roles (Role) ); +INSERT INTO hobby.roles (Role, CreatedBy, CreatedDate) VALUES +('Admin', 'Jacob', '2021-12-13 03:25:14'), +('regular', 'Jacob', '2021-12-13 03:25:14'); + INSERT INTO hobby.users (UserName, Password, Role, IsActive, CreatedBy, CreatedDate, Email) VALUES ('Colin ', 'Waffle', 'Admin', 1, 'Jacob', '2021-12-13 04:27:42', null), @@ -36,11 +42,6 @@ INSERT INTO hobby.users (UserName, Password, Role, IsActive, CreatedBy, CreatedD ('Rifat', '1234', 'Admin', 1, 'Jacob', '2021-12-13 04:29:55', null); -INSERT INTO hobby.roles (Role, CreatedBy, CreatedDate) VALUES -('Admin', 'Jacob', '2021-12-13 03:25:14'), -('regular', 'Jacob', '2021-12-13 03:25:14'); - - SET Global innodb_file_per_table=ON; SET GLOBAL innodb_default_row_format='dynamic';