init commit,

This commit is contained in:
louiscklaw
2025-05-28 09:55:51 +08:00
commit efe70ceb69
8042 changed files with 951668 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
-- Create a table called "todos"
-- with a column to store tasks.
BEGIN;
DROP TABLE IF EXISTS "todos";
CREATE TABLE todos(
id serial PRIMARY KEY,
task text
);
-- Turn on security
ALTER TABLE "todos" ENABLE ROW LEVEL SECURITY;
-- Allow anonymous access
CREATE POLICY "Allow public access" ON todos
FOR SELECT TO anon
USING (TRUE);
-- Turn on security
ALTER TABLE "todos" ENABLE ROW LEVEL SECURITY;
-- Add some data
INSERT INTO todos(task)
VALUES
('Create tables'),
('Enable security'),
('Add data'),
('Fetch data from the API');
COMMIT;