|
@@ -0,0 +1,581 @@
|
|
|
|
|
+{
|
|
|
|
|
+ "id": "0ae16ec8-cab7-46f6-927c-3bb1022a5ebd",
|
|
|
|
|
+ "prevId": "00000000-0000-0000-0000-000000000000",
|
|
|
|
|
+ "version": "7",
|
|
|
|
|
+ "dialect": "postgresql",
|
|
|
|
|
+ "tables": {
|
|
|
|
|
+ "public.group_roles": {
|
|
|
|
|
+ "name": "group_roles",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "group_id": {
|
|
|
|
|
+ "name": "group_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "role_id": {
|
|
|
|
|
+ "name": "role_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {
|
|
|
|
|
+ "group_roles_group_id_groups_id_fk": {
|
|
|
|
|
+ "name": "group_roles_group_id_groups_id_fk",
|
|
|
|
|
+ "tableFrom": "group_roles",
|
|
|
|
|
+ "tableTo": "groups",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "group_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ },
|
|
|
|
|
+ "group_roles_role_id_roles_id_fk": {
|
|
|
|
|
+ "name": "group_roles_role_id_roles_id_fk",
|
|
|
|
|
+ "tableFrom": "group_roles",
|
|
|
|
|
+ "tableTo": "roles",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "role_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "compositePrimaryKeys": {
|
|
|
|
|
+ "group_roles_group_id_role_id_pk": {
|
|
|
|
|
+ "name": "group_roles_group_id_role_id_pk",
|
|
|
|
|
+ "columns": [
|
|
|
|
|
+ "group_id",
|
|
|
|
|
+ "role_id"
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "uniqueConstraints": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.groups": {
|
|
|
|
|
+ "name": "groups",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "id": {
|
|
|
|
|
+ "name": "id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": true,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "gen_random_uuid()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "name": {
|
|
|
|
|
+ "name": "name",
|
|
|
|
|
+ "type": "varchar(100)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "parent_id": {
|
|
|
|
|
+ "name": "parent_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "created_at": {
|
|
|
|
|
+ "name": "created_at",
|
|
|
|
|
+ "type": "timestamp",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "now()"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {},
|
|
|
|
|
+ "compositePrimaryKeys": {},
|
|
|
|
|
+ "uniqueConstraints": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.permissions": {
|
|
|
|
|
+ "name": "permissions",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "id": {
|
|
|
|
|
+ "name": "id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": true,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "gen_random_uuid()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "action": {
|
|
|
|
|
+ "name": "action",
|
|
|
|
|
+ "type": "varchar(50)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "resource_type": {
|
|
|
|
|
+ "name": "resource_type",
|
|
|
|
|
+ "type": "varchar(50)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {},
|
|
|
|
|
+ "compositePrimaryKeys": {},
|
|
|
|
|
+ "uniqueConstraints": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.role_permissions": {
|
|
|
|
|
+ "name": "role_permissions",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "role_id": {
|
|
|
|
|
+ "name": "role_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "permission_id": {
|
|
|
|
|
+ "name": "permission_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {
|
|
|
|
|
+ "role_permissions_role_id_roles_id_fk": {
|
|
|
|
|
+ "name": "role_permissions_role_id_roles_id_fk",
|
|
|
|
|
+ "tableFrom": "role_permissions",
|
|
|
|
|
+ "tableTo": "roles",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "role_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ },
|
|
|
|
|
+ "role_permissions_permission_id_permissions_id_fk": {
|
|
|
|
|
+ "name": "role_permissions_permission_id_permissions_id_fk",
|
|
|
|
|
+ "tableFrom": "role_permissions",
|
|
|
|
|
+ "tableTo": "permissions",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "permission_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "compositePrimaryKeys": {
|
|
|
|
|
+ "role_permissions_role_id_permission_id_pk": {
|
|
|
|
|
+ "name": "role_permissions_role_id_permission_id_pk",
|
|
|
|
|
+ "columns": [
|
|
|
|
|
+ "role_id",
|
|
|
|
|
+ "permission_id"
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "uniqueConstraints": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.roles": {
|
|
|
|
|
+ "name": "roles",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "id": {
|
|
|
|
|
+ "name": "id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": true,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "gen_random_uuid()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "name": {
|
|
|
|
|
+ "name": "name",
|
|
|
|
|
+ "type": "varchar(50)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "description": {
|
|
|
|
|
+ "name": "description",
|
|
|
|
|
+ "type": "text",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {},
|
|
|
|
|
+ "compositePrimaryKeys": {},
|
|
|
|
|
+ "uniqueConstraints": {
|
|
|
|
|
+ "roles_name_unique": {
|
|
|
|
|
+ "name": "roles_name_unique",
|
|
|
|
|
+ "nullsNotDistinct": false,
|
|
|
|
|
+ "columns": [
|
|
|
|
|
+ "name"
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.user_groups": {
|
|
|
|
|
+ "name": "user_groups",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "user_id": {
|
|
|
|
|
+ "name": "user_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "group_id": {
|
|
|
|
|
+ "name": "group_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {
|
|
|
|
|
+ "user_groups_user_id_users_id_fk": {
|
|
|
|
|
+ "name": "user_groups_user_id_users_id_fk",
|
|
|
|
|
+ "tableFrom": "user_groups",
|
|
|
|
|
+ "tableTo": "users",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "user_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ },
|
|
|
|
|
+ "user_groups_group_id_groups_id_fk": {
|
|
|
|
|
+ "name": "user_groups_group_id_groups_id_fk",
|
|
|
|
|
+ "tableFrom": "user_groups",
|
|
|
|
|
+ "tableTo": "groups",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "group_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "compositePrimaryKeys": {
|
|
|
|
|
+ "user_groups_user_id_group_id_pk": {
|
|
|
|
|
+ "name": "user_groups_user_id_group_id_pk",
|
|
|
|
|
+ "columns": [
|
|
|
|
|
+ "user_id",
|
|
|
|
|
+ "group_id"
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "uniqueConstraints": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.user_roles": {
|
|
|
|
|
+ "name": "user_roles",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "user_id": {
|
|
|
|
|
+ "name": "user_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "role_id": {
|
|
|
|
|
+ "name": "role_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {
|
|
|
|
|
+ "user_roles_user_id_users_id_fk": {
|
|
|
|
|
+ "name": "user_roles_user_id_users_id_fk",
|
|
|
|
|
+ "tableFrom": "user_roles",
|
|
|
|
|
+ "tableTo": "users",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "user_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ },
|
|
|
|
|
+ "user_roles_role_id_roles_id_fk": {
|
|
|
|
|
+ "name": "user_roles_role_id_roles_id_fk",
|
|
|
|
|
+ "tableFrom": "user_roles",
|
|
|
|
|
+ "tableTo": "roles",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "role_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "compositePrimaryKeys": {
|
|
|
|
|
+ "user_roles_user_id_role_id_pk": {
|
|
|
|
|
+ "name": "user_roles_user_id_role_id_pk",
|
|
|
|
|
+ "columns": [
|
|
|
|
|
+ "user_id",
|
|
|
|
|
+ "role_id"
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "uniqueConstraints": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.users": {
|
|
|
|
|
+ "name": "users",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "id": {
|
|
|
|
|
+ "name": "id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": true,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "gen_random_uuid()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "email": {
|
|
|
|
|
+ "name": "email",
|
|
|
|
|
+ "type": "varchar(255)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "name": {
|
|
|
|
|
+ "name": "name",
|
|
|
|
|
+ "type": "text",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "password_hash": {
|
|
|
|
|
+ "name": "password_hash",
|
|
|
|
|
+ "type": "text",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "created_at": {
|
|
|
|
|
+ "name": "created_at",
|
|
|
|
|
+ "type": "timestamp",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "now()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "updated_at": {
|
|
|
|
|
+ "name": "updated_at",
|
|
|
|
|
+ "type": "timestamp",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "now()"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {},
|
|
|
|
|
+ "compositePrimaryKeys": {},
|
|
|
|
|
+ "uniqueConstraints": {
|
|
|
|
|
+ "users_email_unique": {
|
|
|
|
|
+ "name": "users_email_unique",
|
|
|
|
|
+ "nullsNotDistinct": false,
|
|
|
|
|
+ "columns": [
|
|
|
|
|
+ "email"
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.acl_rules": {
|
|
|
|
|
+ "name": "acl_rules",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "id": {
|
|
|
|
|
+ "name": "id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": true,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "gen_random_uuid()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "resource_id": {
|
|
|
|
|
+ "name": "resource_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "subject_type": {
|
|
|
|
|
+ "name": "subject_type",
|
|
|
|
|
+ "type": "varchar(20)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "subject_id": {
|
|
|
|
|
+ "name": "subject_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "permission_type": {
|
|
|
|
|
+ "name": "permission_type",
|
|
|
|
|
+ "type": "varchar(20)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "action": {
|
|
|
|
|
+ "name": "action",
|
|
|
|
|
+ "type": "varchar(50)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "created_at": {
|
|
|
|
|
+ "name": "created_at",
|
|
|
|
|
+ "type": "timestamp",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "now()"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {
|
|
|
|
|
+ "acl_rules_resource_id_resources_id_fk": {
|
|
|
|
|
+ "name": "acl_rules_resource_id_resources_id_fk",
|
|
|
|
|
+ "tableFrom": "acl_rules",
|
|
|
|
|
+ "tableTo": "resources",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "resource_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "cascade",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "compositePrimaryKeys": {},
|
|
|
|
|
+ "uniqueConstraints": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "public.resources": {
|
|
|
|
|
+ "name": "resources",
|
|
|
|
|
+ "schema": "",
|
|
|
|
|
+ "columns": {
|
|
|
|
|
+ "id": {
|
|
|
|
|
+ "name": "id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": true,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "gen_random_uuid()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "name": {
|
|
|
|
|
+ "name": "name",
|
|
|
|
|
+ "type": "varchar(255)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "path": {
|
|
|
|
|
+ "name": "path",
|
|
|
|
|
+ "type": "text",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "type": {
|
|
|
|
|
+ "name": "type",
|
|
|
|
|
+ "type": "varchar(50)",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true
|
|
|
|
|
+ },
|
|
|
|
|
+ "owner_id": {
|
|
|
|
|
+ "name": "owner_id",
|
|
|
|
|
+ "type": "uuid",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": false
|
|
|
|
|
+ },
|
|
|
|
|
+ "created_at": {
|
|
|
|
|
+ "name": "created_at",
|
|
|
|
|
+ "type": "timestamp",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "now()"
|
|
|
|
|
+ },
|
|
|
|
|
+ "updated_at": {
|
|
|
|
|
+ "name": "updated_at",
|
|
|
|
|
+ "type": "timestamp",
|
|
|
|
|
+ "primaryKey": false,
|
|
|
|
|
+ "notNull": true,
|
|
|
|
|
+ "default": "now()"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "indexes": {},
|
|
|
|
|
+ "foreignKeys": {
|
|
|
|
|
+ "resources_owner_id_users_id_fk": {
|
|
|
|
|
+ "name": "resources_owner_id_users_id_fk",
|
|
|
|
|
+ "tableFrom": "resources",
|
|
|
|
|
+ "tableTo": "users",
|
|
|
|
|
+ "columnsFrom": [
|
|
|
|
|
+ "owner_id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "columnsTo": [
|
|
|
|
|
+ "id"
|
|
|
|
|
+ ],
|
|
|
|
|
+ "onDelete": "set null",
|
|
|
|
|
+ "onUpdate": "no action"
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "compositePrimaryKeys": {},
|
|
|
|
|
+ "uniqueConstraints": {
|
|
|
|
|
+ "resources_path_unique": {
|
|
|
|
|
+ "name": "resources_path_unique",
|
|
|
|
|
+ "nullsNotDistinct": false,
|
|
|
|
|
+ "columns": [
|
|
|
|
|
+ "path"
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "checkConstraints": {},
|
|
|
|
|
+ "isRLSEnabled": false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ "enums": {},
|
|
|
|
|
+ "schemas": {},
|
|
|
|
|
+ "sequences": {},
|
|
|
|
|
+ "roles": {},
|
|
|
|
|
+ "policies": {},
|
|
|
|
|
+ "views": {},
|
|
|
|
|
+ "_meta": {
|
|
|
|
|
+ "columns": {},
|
|
|
|
|
+ "schemas": {},
|
|
|
|
|
+ "tables": {}
|
|
|
|
|
+ }
|
|
|
|
|
+}
|