feat: Added avaliable tags and tag column to table #34
@@ -3,3 +3,25 @@ import type { Database } from "./database.d.ts";
|
||||
export type Table<T extends keyof Database["public"]["Tables"]> =
|
||||
Database["public"]["Tables"][T]["Row"];
|
||||
export type Enum<T extends keyof Database["public"]["Enums"]> = Database["public"]["Enums"][T];
|
||||
|
||||
export const availableStudySpaceTags = [
|
||||
"Quiet",
|
||||
"Loud",
|
||||
"Silent",
|
||||
"Group study",
|
||||
"Individual study",
|
||||
"Power outlets",
|
||||
"No power outlets",
|
||||
"24/7",
|
||||
"Food allowed",
|
||||
"No food allowed",
|
||||
"Good wifi",
|
||||
"Bad wifi",
|
||||
"No wifi",
|
||||
"Whiteboard",
|
||||
"Restricted access",
|
||||
"Hot",
|
||||
"Air conditioned",
|
||||
"Cold",
|
||||
"Cringe"
|
||||
];
|
||||
|
||||
@@ -12,6 +12,7 @@ CREATE TABLE study_spaces (
|
||||
-- Location within building, e.g., "Room 101"
|
||||
location text,
|
||||
building_location text,
|
||||
tags text[] NOT NULL DEFAULT array[]::text[],
|
||||
created_at timestamp with time zone DEFAULT now(),
|
||||
updated_at timestamp with time zone DEFAULT now()
|
||||
);
|
||||
@@ -24,6 +25,7 @@ CREATE TABLE study_space_images (
|
||||
PRIMARY KEY (study_space_id, image_path)
|
||||
);
|
||||
|
||||
|
||||
-- Triggers
|
||||
CREATE TRIGGER study_spaces_updated_at
|
||||
AFTER UPDATE ON study_spaces
|
||||
|
||||
Reference in New Issue
Block a user