From e20a49104e3bc312ef92e39047c7c1d82d79f068 Mon Sep 17 00:00:00 2001 From: Rhys Evans <EvansRM17@cardiff.ac.uk> Date: Wed, 29 Nov 2023 19:31:07 +0000 Subject: [PATCH] mock database works pair programmers Rhys Evans, Rhys Nute --- src/main/resources/application.properties | 2 +- src/main/resources/templates/USRdata.sql | 0 src/main/resources/templates/data.sql | 4 ++-- src/main/resources/templates/schema.sql | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 src/main/resources/templates/USRdata.sql diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d7f55564..3e55ef0d 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1,4 @@ -spring.datasource.url=jdbc:mariadb://localhost:3306/rhys +spring.datasource.url=jdbc:mariadb://localhost:3306/users spring.datasource.username=root spring.datasource.password=comsc spring.sql.init.mode=always diff --git a/src/main/resources/templates/USRdata.sql b/src/main/resources/templates/USRdata.sql new file mode 100644 index 00000000..e69de29b diff --git a/src/main/resources/templates/data.sql b/src/main/resources/templates/data.sql index 6b7393c4..f72fbb3f 100644 --- a/src/main/resources/templates/data.sql +++ b/src/main/resources/templates/data.sql @@ -1,2 +1,2 @@ -delete from rhys; -insert into rhys (name, tel_number) values ( 'Ian', '111'); \ No newline at end of file +delete from users; +insert into users (name) values ( 'Rhys',; \ No newline at end of file diff --git a/src/main/resources/templates/schema.sql b/src/main/resources/templates/schema.sql index 0338f622..b69cd276 100644 --- a/src/main/resources/templates/schema.sql +++ b/src/main/resources/templates/schema.sql @@ -1,6 +1,5 @@ -drop table if exists rhys; -create table if not exists rhys ( +drop table if exists users; +create table if not exists users ( id bigint auto_increment primary key, - name varchar(128), - tel_number varchar(128) + name varchar(128) ) engine=InnoDB; \ No newline at end of file -- GitLab