Pattern CREATE TABLE safe
CREATE TABLE IF NOT EXISTS table_name (id UUID PRIMARY KEY DEFAULT gen_random_uuid(), created_at TIMESTAMPTZ DEFAULT NOW());
Pattern Digisimma safe creation table
Pattern ALTER ADD COLUMN safe
ALTER TABLE table_name ADD COLUMN IF NOT EXISTS column_name TEXT;
Ajout colonne sans erreur si existe
Pattern GRANT ALL Digisimma
GRANT ALL ON table_name TO anon, authenticated, service_role;
Permissions standard Digisimma MVP
Pattern DISABLE RLS MVP
ALTER TABLE table_name DISABLE ROW LEVEL SECURITY;
RLS off pour velocite MVP
Voir tables existantes
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' ORDER BY table_name;
Lister toutes les tables
Voir colonnes d'une table
SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'NOM_TABLE';
Schema d'une table