{
  "id": "595b3231-9696-413e-b55b-5ec61cb86165",
  "prevId": "00000000-0000-0000-0000-000000000000",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.certs": {
      "name": "certs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "link": {
          "name": "link",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": true
    },
    "public.drones": {
      "name": "drones",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "model": {
          "name": "model",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "brand": {
          "name": "brand",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "type": {
          "name": "type",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": true
    },
    "public.equipment": {
      "name": "equipment",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": true
    },
    "public.places": {
      "name": "places",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "coord_x": {
          "name": "coord_x",
          "type": "numeric",
          "primaryKey": false,
          "notNull": false
        },
        "coord_y": {
          "name": "coord_y",
          "type": "numeric",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "id_user": {
          "name": "id_user",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "hidden_place": {
          "name": "hidden_place",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "places_id_user_users_id_fk": {
          "name": "places_id_user_users_id_fk",
          "tableFrom": "places",
          "tableTo": "users",
          "schemaTo": "auth",
          "columnsFrom": [
            "id_user"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {
        "select-own-places": {
          "name": "select-own-places",
          "as": "PERMISSIVE",
          "for": "SELECT",
          "to": [
            "authenticated"
          ],
          "using": "\"places\".\"id_user\" = auth.uid()"
        },
        "insert-own-places": {
          "name": "insert-own-places",
          "as": "PERMISSIVE",
          "for": "INSERT",
          "to": [
            "authenticated"
          ],
          "withCheck": "\"places\".\"id_user\" = auth.uid()"
        },
        "update-own-places": {
          "name": "update-own-places",
          "as": "PERMISSIVE",
          "for": "UPDATE",
          "to": [
            "authenticated"
          ],
          "using": "\"places\".\"id_user\" = auth.uid()",
          "withCheck": "\"places\".\"id_user\" = auth.uid()"
        }
      },
      "checkConstraints": {},
      "isRLSEnabled": true
    },
    "public.users_certs": {
      "name": "users_certs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "id_cert": {
          "name": "id_cert",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "id_user": {
          "name": "id_user",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "users_certs_id_cert_certs_id_fk": {
          "name": "users_certs_id_cert_certs_id_fk",
          "tableFrom": "users_certs",
          "tableTo": "certs",
          "columnsFrom": [
            "id_cert"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "users_certs_id_user_users_id_fk": {
          "name": "users_certs_id_user_users_id_fk",
          "tableFrom": "users_certs",
          "tableTo": "users",
          "schemaTo": "auth",
          "columnsFrom": [
            "id_user"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {
        "select-own-user-certs": {
          "name": "select-own-user-certs",
          "as": "PERMISSIVE",
          "for": "SELECT",
          "to": [
            "authenticated"
          ],
          "using": "\"users_certs\".\"id_user\" = auth.uid()"
        },
        "insert-own-user-certs": {
          "name": "insert-own-user-certs",
          "as": "PERMISSIVE",
          "for": "INSERT",
          "to": [
            "authenticated"
          ],
          "withCheck": "\"users_certs\".\"id_user\" = auth.uid()"
        }
      },
      "checkConstraints": {},
      "isRLSEnabled": true
    },
    "public.users_drones": {
      "name": "users_drones",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "id_drone": {
          "name": "id_drone",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "id_user": {
          "name": "id_user",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "users_drones_id_drone_drones_id_fk": {
          "name": "users_drones_id_drone_drones_id_fk",
          "tableFrom": "users_drones",
          "tableTo": "drones",
          "columnsFrom": [
            "id_drone"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "users_drones_id_user_users_id_fk": {
          "name": "users_drones_id_user_users_id_fk",
          "tableFrom": "users_drones",
          "tableTo": "users",
          "schemaTo": "auth",
          "columnsFrom": [
            "id_user"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {
        "select-own-user-drones": {
          "name": "select-own-user-drones",
          "as": "PERMISSIVE",
          "for": "SELECT",
          "to": [
            "authenticated"
          ],
          "using": "\"users_drones\".\"id_user\" = auth.uid()"
        },
        "insert-own-user-drones": {
          "name": "insert-own-user-drones",
          "as": "PERMISSIVE",
          "for": "INSERT",
          "to": [
            "authenticated"
          ],
          "withCheck": "\"users_drones\".\"id_user\" = auth.uid()"
        }
      },
      "checkConstraints": {},
      "isRLSEnabled": true
    },
    "public.users_places": {
      "name": "users_places",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "id_place": {
          "name": "id_place",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "id_user": {
          "name": "id_user",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "users_places_id_place_places_id_fk": {
          "name": "users_places_id_place_places_id_fk",
          "tableFrom": "users_places",
          "tableTo": "places",
          "columnsFrom": [
            "id_place"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "users_places_id_user_users_id_fk": {
          "name": "users_places_id_user_users_id_fk",
          "tableFrom": "users_places",
          "tableTo": "users",
          "schemaTo": "auth",
          "columnsFrom": [
            "id_user"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {
        "select-own-user-places": {
          "name": "select-own-user-places",
          "as": "PERMISSIVE",
          "for": "SELECT",
          "to": [
            "authenticated"
          ],
          "using": "\"users_places\".\"id_user\" = auth.uid()"
        },
        "insert-own-user-places": {
          "name": "insert-own-user-places",
          "as": "PERMISSIVE",
          "for": "INSERT",
          "to": [
            "authenticated"
          ],
          "withCheck": "\"users_places\".\"id_user\" = auth.uid()"
        }
      },
      "checkConstraints": {},
      "isRLSEnabled": true
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}