Personal Table
Customizable table
const columns = [
{name: 'id', type: 'bigserial', primaryKey: true},
{name: 'name', type: 'text', notNull: true},
{name: 'last_name', type: 'text', notNull: true},
{name: 'phone_number', type: 'numeric', notNull: false},
{name: 'language', type: 'text', notNull: true},
{name: 'validations', type: 'boolean[]', notNull: false, define: 'ARRAY[false,false]'},
{name: 'created_at', type: 'timestamptz', notNull: 'now()'},
]await DatabaseManager.query(createTableQuery);
console.log("Table created successfully");
// Enable row level security basic to supabase table
const enableRLSQuery = `ALTER TABLE ${tableName} ENABLE ROW LEVEL SECURITY`;
await DatabaseManager.query(enableRLSQuery);
console.log('Row level security enabled');Última actualización