next-enterprise/supabase/migrations/20231124_create_todos.sql
2024-11-24 22:41:48 -08:00

13 lines
389 B
SQL

CREATE TABLE IF NOT EXISTS todos (
id BIGSERIAL PRIMARY KEY,
title TEXT NOT NULL,
is_complete BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP WITH TIME ZONE
);
-- Insert some sample data
INSERT INTO todos (title) VALUES
('Learn Next.js'),
('Build a Supabase project'),
('Deploy to production');