From dfcc4d7c371d08af53811a2978ea3f359a387569 Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Tue, 4 Jun 2024 22:53:53 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=83=BC=E3=83=96=E3=83=AB=E3=81=AE?= =?UTF-8?q?=E5=90=8D=E5=89=8D=E3=80=81=E3=82=AB=E3=83=A9=E3=83=A0=E3=81=AA?= =?UTF-8?q?=E3=81=A9=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/データベースセットアップ.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/データベースセットアップ.txt b/docs/データベースセットアップ.txt index d719e70..14d8667 100644 --- a/docs/データベースセットアップ.txt +++ b/docs/データベースセットアップ.txt @@ -1,13 +1,8 @@ # ログイン psql -U suti7 -d dislocker -CREATE TABLE user -(user_id INTEGER PRIMARY KEY NOT NULL, -discord_id INTEGER NOT NULL, -discord_username VARCHAR(32) NOT NULL, -PRIMARY KEY (user_id)); +CREATE TABLE club_member (id SERIAL NOT NULL, name VARCHAR(30) NOT NULL, discord_username VARCHAR(32) NOT NULL, discord_userid VARCHAR(18) NOT NULL, PRIMARY KEY (id)); +CREATE TABLE pc_usage_history (id SERIAL NOT NULL, member_id INTEGER NOT NULL, pc_number INTEGER NOT NULL, device_number INTEGER NOT NULL, start_use_time TIMESTAMP NOT NULL, end_use_time TIMESTAMP, use_detail VARCHAR(30), PRIMARY KEY (id), FOREIGN KEY (memb +er_id) REFERENCES club_member(id)); -CREATE TABLE user_list (user_id INTEGER NOT NULL, discord_username VARCHAR(32) NOT NULL, discord_userid INTEGER NOT NULL, PRIMARY KEY (user_id)); - -# テーブルを作る -CREATE TABLE web_auth (id SERIAL, username VARCHAR(10) NOT NULL, password VARCHAR(32) NOT NULL, PRIMARY KEY(id)); \ No newline at end of file +INSERTのとき文字列はシングルクォーテーションで囲む!!! \ No newline at end of file