wrightedu / CSE-Discord-Bot

Discord bot for the WSU CSE Discord server
GNU General Public License v3.0
2 stars 4 forks source link

Create database/tables on bot spin up #318

Closed bibekrj closed 1 month ago

bibekrj commented 1 month ago

Who are you? CSE Dev

What feature do you want? Program should check if the sqlite database file exists. If not, it should create the database as well as the tables.

Why do you want this feature? Need database to store the user data, check in/checkout and pomodoro records.

Additional context

Following are the details of the database Table User User_id: Number[Primary Key] Discord_id: String Discord_Name: String Date_Registered: DateTime

Table Timesheet Time_Id: Number[Primary Key, Auto Increment] Discord_id: Number [Foreign Key, links to Table User(_userid)] Time_in: DateTime Time_out: DateTime TotalHours: Number

Table Pomodoro Pomo_id: Number [Primary Key, Auto Increment] Timesheet_Id: Number [Foreign Key, links to Table Timesheet(_timeid)] Issue: String Time_Start: DateTime Time_Finish: DateTime Time_Delta: Number Status: Boolean Help: Number

Table Help Help_Id: Number[Primary Key, Auto Increment] remark: String pomo_id: Number[Foreign Key, links to the Table pomodoro(_Pomoid)]