336 lines
8.0 KiB
JSON
336 lines
8.0 KiB
JSON
{
|
|
"id": "462e99b2-ba6b-4c91-9f6b-891795695955",
|
|
"prevId": "7d0d4272-65ba-45cf-9dd3-a5e2008d3744",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.certifications": {
|
|
"name": "certifications",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {
|
|
"select-certifications": {
|
|
"name": "select-certifications",
|
|
"as": "PERMISSIVE",
|
|
"for": "SELECT",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"using": "true"
|
|
}
|
|
},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": true
|
|
},
|
|
"public.drone_models": {
|
|
"name": "drone_models",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {
|
|
"select-drone-models": {
|
|
"name": "select-drone-models",
|
|
"as": "PERMISSIVE",
|
|
"for": "SELECT",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"using": "true"
|
|
}
|
|
},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": true
|
|
},
|
|
"public.pilots": {
|
|
"name": "pilots",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"location": {
|
|
"name": "location",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"latitude": {
|
|
"name": "latitude",
|
|
"type": "double precision",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"longitude": {
|
|
"name": "longitude",
|
|
"type": "double precision",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"company": {
|
|
"name": "company",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"position": {
|
|
"name": "position",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"differentiation": {
|
|
"name": "differentiation",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"coverage_areas": {
|
|
"name": "coverage_areas",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"specialization_areas": {
|
|
"name": "specialization_areas",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"certification_ids": {
|
|
"name": "certification_ids",
|
|
"type": "integer[]",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"drone_model_ids": {
|
|
"name": "drone_model_ids",
|
|
"type": "integer[]",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"pilots_id_fkey": {
|
|
"name": "pilots_id_fkey",
|
|
"tableFrom": "pilots",
|
|
"tableTo": "users",
|
|
"schemaTo": "auth",
|
|
"columnsFrom": [
|
|
"id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {
|
|
"select-own-pilot": {
|
|
"name": "select-own-pilot",
|
|
"as": "PERMISSIVE",
|
|
"for": "SELECT",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"using": "\"pilots\".\"id\" = auth.uid()"
|
|
},
|
|
"update-own-pilot": {
|
|
"name": "update-own-pilot",
|
|
"as": "PERMISSIVE",
|
|
"for": "UPDATE",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"using": "\"pilots\".\"id\" = auth.uid()",
|
|
"withCheck": "\"pilots\".\"id\" = auth.uid()"
|
|
},
|
|
"insert-pilot": {
|
|
"name": "insert-pilot",
|
|
"as": "PERMISSIVE",
|
|
"for": "INSERT",
|
|
"to": [
|
|
"authenticated"
|
|
],
|
|
"withCheck": "\"pilots\".\"id\" = auth.uid()"
|
|
}
|
|
},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": true
|
|
},
|
|
"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": {}
|
|
}
|
|
} |