first commit

This commit is contained in:
2026-04-30 18:22:10 +02:00
commit c3e98af5b6
36 changed files with 4779 additions and 0 deletions
+208
View File
@@ -0,0 +1,208 @@
{
"version": "6",
"dialect": "sqlite",
"id": "d219f155-9dd0-48e3-8fd2-8278f1f788ca",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"consumers": {
"name": "consumers",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"distribution_board_id": {
"name": "distribution_board_id",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"quantity": {
"name": "quantity",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"installed_power_per_unit_kw": {
"name": "installed_power_per_unit_kw",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"demand_factor": {
"name": "demand_factor",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"voltage_v": {
"name": "voltage_v",
"type": "real",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"phase_count": {
"name": "phase_count",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"power_factor": {
"name": "power_factor",
"type": "real",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"note": {
"name": "note",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"consumers_project_id_projects_id_fk": {
"name": "consumers_project_id_projects_id_fk",
"tableFrom": "consumers",
"tableTo": "projects",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
},
"consumers_distribution_board_id_distribution_boards_id_fk": {
"name": "consumers_distribution_board_id_distribution_boards_id_fk",
"tableFrom": "consumers",
"tableTo": "distribution_boards",
"columnsFrom": [
"distribution_board_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"distribution_boards": {
"name": "distribution_boards",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"distribution_boards_project_id_projects_id_fk": {
"name": "distribution_boards_project_id_projects_id_fk",
"tableFrom": "distribution_boards",
"tableTo": "projects",
"columnsFrom": [
"project_id"
],
"columnsTo": [
"id"
],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"projects": {
"name": "projects",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}
+13
View File
@@ -0,0 +1,13 @@
{
"version": "7",
"dialect": "sqlite",
"entries": [
{
"idx": 0,
"version": "6",
"when": 1777565414148,
"tag": "0000_bizarre_colossus",
"breakpoints": true
}
]
}