261 lines
6.1 KiB
JSON
261 lines
6.1 KiB
JSON
{
|
|
"id": "23f11c9d-f98b-4321-aca4-54ec7fc4eece",
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"public.floors": {
|
|
"name": "floors",
|
|
"schema": "",
|
|
"columns": {
|
|
"floor": {
|
|
"name": "floor",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"url": {
|
|
"name": "url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"image": {
|
|
"name": "image",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plans": {
|
|
"name": "plans",
|
|
"schema": "",
|
|
"columns": {
|
|
"floor": {
|
|
"name": "floor",
|
|
"type": "integer",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"plan": {
|
|
"name": "plan",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sensor_data": {
|
|
"name": "sensor_data",
|
|
"schema": "",
|
|
"columns": {
|
|
"uuid": {
|
|
"name": "uuid",
|
|
"type": "uuid",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"default": "gen_random_uuid()"
|
|
},
|
|
"sensor": {
|
|
"name": "sensor",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"temperature": {
|
|
"name": "temperature",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"humidity": {
|
|
"name": "humidity",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"pressure": {
|
|
"name": "pressure",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"altitude": {
|
|
"name": "altitude",
|
|
"type": "real",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"time": {
|
|
"name": "time",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "now()"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sensor_data_sensor_sensors_id_fk": {
|
|
"name": "sensor_data_sensor_sensors_id_fk",
|
|
"tableFrom": "sensor_data",
|
|
"tableTo": "sensors",
|
|
"columnsFrom": ["sensor"],
|
|
"columnsTo": ["id"],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sensors": {
|
|
"name": "sensors",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user": {
|
|
"name": "user",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sensors_user_users_id_fk": {
|
|
"name": "sensors_user_users_id_fk",
|
|
"tableFrom": "sensors",
|
|
"tableTo": "users",
|
|
"columnsFrom": ["user"],
|
|
"columnsTo": ["id"],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sessions": {
|
|
"name": "sessions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp with time zone",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sessions_user_id_users_id_fk": {
|
|
"name": "sessions_user_id_users_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "users",
|
|
"columnsFrom": ["user_id"],
|
|
"columnsTo": ["id"],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.users": {
|
|
"name": "users",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"age": {
|
|
"name": "age",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"password_hash": {
|
|
"name": "password_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"users_username_unique": {
|
|
"name": "users_username_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": ["username"]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
}
|