125 lines
2.9 KiB
JSON
125 lines
2.9 KiB
JSON
{
|
|
"id": "7d0d4272-65ba-45cf-9dd3-a5e2008d3744",
|
|
"prevId": "c266fe94-b863-4b6c-930c-44af8af68c1a",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.profiles": {
|
|
"name": "profiles",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"first_name": {
|
|
"name": "first_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_name": {
|
|
"name": "last_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"profiles_id_fkey": {
|
|
"name": "profiles_id_fkey",
|
|
"tableFrom": "profiles",
|
|
"tableTo": "users",
|
|
"schemaTo": "auth",
|
|
"columnsFrom": [
|
|
"id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {
|
|
"select-own-profile": {
|
|
"name": "select-own-profile",
|
|
"as": "PERMISSIVE",
|
|
"for": "SELECT",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"using": "\"profiles\".\"id\" = auth.uid()"
|
|
},
|
|
"update-own-profile": {
|
|
"name": "update-own-profile",
|
|
"as": "PERMISSIVE",
|
|
"for": "UPDATE",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"using": "\"profiles\".\"id\" = auth.uid()",
|
|
"withCheck": "\"profiles\".\"id\" = auth.uid()"
|
|
},
|
|
"insert-profile": {
|
|
"name": "insert-profile",
|
|
"as": "PERMISSIVE",
|
|
"for": "INSERT",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"withCheck": "\"profiles\".\"id\" = auth.uid()"
|
|
}
|
|
},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": true
|
|
},
|
|
"public.demo": {
|
|
"name": "demo",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"full_name": {
|
|
"name": "full_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"phone": {
|
|
"name": "phone",
|
|
"type": "varchar(256)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |