From 8e0a627cc92fe11a23fbcad650fba32eb895bfe7 Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Tue, 3 Dec 2024 19:24:29 +0000 Subject: [PATCH] =?UTF-8?q?[feat]=20=E7=89=A9=E5=93=81=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=A8=E3=82=8A=E3=81=AEsql=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql/db/buy_reports.sql | 12 ++++++++++++ mysql/db/divisions.sql | 10 ++++++++++ mysql/db/festival_items.sql | 11 +++++++++++ mysql/db/item_budget.sql | 10 ++++++++++ mysql/db/user_groups.sql | 10 ++++++++++ 5 files changed, 53 insertions(+) create mode 100644 mysql/db/buy_reports.sql create mode 100644 mysql/db/divisions.sql create mode 100644 mysql/db/festival_items.sql create mode 100644 mysql/db/item_budget.sql create mode 100644 mysql/db/user_groups.sql diff --git a/mysql/db/buy_reports.sql b/mysql/db/buy_reports.sql new file mode 100644 index 000000000..bab7e16d8 --- /dev/null +++ b/mysql/db/buy_reports.sql @@ -0,0 +1,12 @@ +USE finansu_db; + +CREATE TABLE buy_reports ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + festival_item_id INT(10) UNSIGNED NOT NULL, + amount INT(10) NOT NULL, + memo VARCHAR(255) NOT NULL, + paid_by VARCHAR(255) NOT NULL, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (id) +); diff --git a/mysql/db/divisions.sql b/mysql/db/divisions.sql new file mode 100644 index 000000000..a6ec465fe --- /dev/null +++ b/mysql/db/divisions.sql @@ -0,0 +1,10 @@ +USE finansu_db; + +CREATE TABLE divisions ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + name VARCHAR(255) NOT NULL, + financial_record_id INT(10) UNSIGNED NOT NULL, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (id) +); diff --git a/mysql/db/festival_items.sql b/mysql/db/festival_items.sql new file mode 100644 index 000000000..a4dbfed6f --- /dev/null +++ b/mysql/db/festival_items.sql @@ -0,0 +1,11 @@ +USE finansu_db; + +CREATE TABLE festival_items ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + name VARCHAR(255) NOT NULL, + memo VARCHAR(255) NOT NULL, + division_id INT(10) UNSIGNED NOT NULL, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (id) +); diff --git a/mysql/db/item_budget.sql b/mysql/db/item_budget.sql new file mode 100644 index 000000000..109aa8ed6 --- /dev/null +++ b/mysql/db/item_budget.sql @@ -0,0 +1,10 @@ +USE finansu_db; + +CREATE TABLE item_budgets ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + amount INT(10) NOT NULL, + festival_item_id INT(10) UNSIGNED NOT NULL, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (id) +); diff --git a/mysql/db/user_groups.sql b/mysql/db/user_groups.sql new file mode 100644 index 000000000..fa2ae1eef --- /dev/null +++ b/mysql/db/user_groups.sql @@ -0,0 +1,10 @@ +USE finansu_db; + +CREATE TABLE user_groups ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + user_id INT(10) NOT NULL, + group_id INT(10) NOT NULL, + created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (id), +);