refactor: cleanup skeleton, setup supabase properly

This commit is contained in:
2025-06-04 11:21:54 +01:00
parent 8b09523b21
commit b4f2b60bec
14 changed files with 5545 additions and 5384 deletions

View File

@@ -40,17 +40,3 @@ FOR EACH ROW EXECUTE FUNCTION handle_updated_at();
CREATE TRIGGER study_space_images_updated_at
AFTER UPDATE ON study_space_images
FOR EACH ROW EXECUTE FUNCTION handle_updated_at();
-- Security
-- ALTER TABLE study_spaces ENABLE ROW LEVEL SECURITY;
-- ALTER TABLE study_space_images ENABLE ROW LEVEL SECURITY;
-- CREATE POLICY "Allow all users to view study spaces"
-- ON study_spaces
-- FOR SELECT
-- USING (true);
-- CREATE POLICY "Allow all users to view study space images"
-- ON study_space_images
-- FOR SELECT
-- USING (true);

View File

@@ -0,0 +1,4 @@
ALTER TABLE study_spaces DROP COLUMN title;
ALTER TABLE study_spaces ADD COLUMN building_address text;
ALTER TABLE study_spaces ADD COLUMN description text;
ALTER TABLE study_spaces ADD COLUMN location text;

View File

@@ -8,7 +8,10 @@ CREATE POLICY "Whack"
CREATE TABLE study_spaces (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
title text NOT NULL,
description text,
-- Location within building, e.g., "Room 101"
location text,
building_address text,
created_at timestamp with time zone DEFAULT now(),
updated_at timestamp with time zone DEFAULT now()
);
@@ -29,17 +32,3 @@ FOR EACH ROW EXECUTE FUNCTION handle_updated_at();
CREATE TRIGGER study_space_images_updated_at
AFTER UPDATE ON study_space_images
FOR EACH ROW EXECUTE FUNCTION handle_updated_at();
-- Security
-- ALTER TABLE study_spaces ENABLE ROW LEVEL SECURITY;
-- ALTER TABLE study_space_images ENABLE ROW LEVEL SECURITY;
-- CREATE POLICY "Allow all users to view study spaces"
-- ON study_spaces
-- FOR SELECT
-- USING (true);
-- CREATE POLICY "Allow all users to view study space images"
-- ON study_space_images
-- FOR SELECT
-- USING (true);