From e6255112ed7ddeb5e07a73b27776a1a2d15696f9 Mon Sep 17 00:00:00 2001 From: hqo1e21 <hqo1e21@soton.ac.uk> Date: Mon, 8 May 2023 22:43:49 +0800 Subject: [PATCH] (Commit message) script file to create database --- createDB.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 createDB.sh diff --git a/createDB.sh b/createDB.sh new file mode 100755 index 0000000..9b4c581 --- /dev/null +++ b/createDB.sh @@ -0,0 +1,10 @@ +#!/bin/bash +$(/opt/lampp/bin/mysql -u root -e "create database cw2; use cw2") + +$(/opt/lampp/bin/mysql -u root -e "use cw2; create table gold (goldBit float, goldAsk float, goldChg float, goldCHgPercent float, dateTime DATETIME default current_timestamp())") + +$(/opt/lampp/bin/mysql -u root -e "use cw2; create table silver (silverBit float, silverAsk float, silverChg float, silverCHgPercent float, dateTime DATETIME default current_timestamp())") + +$(/opt/lampp/bin/mysql -u root -e "use cw2; create table platinum (platinumBit float, platinumAsk float, platinumChg float, platinumCHgPercent float, dateTime DATETIME default current_timestamp())") + +$(/opt/lampp/bin/mysql -u root -e "use cw2; create table palladium (palladiumBit float, palladiumAsk float, palladiumChg float, palladiumCHgPercent float, dateTime DATETIME default current_timestamp())") -- GitLab