Files
Termix/plugins/fleets/migrations/snapshot.json
T

142 lines
2.8 KiB
JSON

{
"version": 1,
"tables": {
"fleets": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"name": {
"type": "text",
"notNull": true
},
"description": {
"type": "text"
},
"color": {
"type": "text"
},
"icon": {
"type": "text"
},
"tagRules": {
"type": "text"
},
"syncId": {
"type": "text",
"unique": true
},
"createdAt": {
"type": "text",
"notNull": true,
"defaultNow": true
},
"updatedAt": {
"type": "text",
"notNull": true,
"defaultNow": true
}
},
"indexes": [],
"adopts": "fleets"
},
"members": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"fleetId": {
"type": "integer",
"notNull": true
},
"hostId": {
"type": "refHost",
"notNull": true
},
"addedAt": {
"type": "text",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_fleet_members_fleet_host",
"columns": ["fleetId", "hostId"],
"unique": true
},
{
"name": "idx_fleet_members_host",
"columns": ["hostId"]
}
],
"adopts": "fleet_members"
},
"inventory": {
"columns": {
"id": {
"type": "id",
"primaryKey": true,
"notNull": true
},
"hostId": {
"type": "refHost",
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"osPrettyName": {
"type": "text"
},
"kernel": {
"type": "text"
},
"architecture": {
"type": "text"
},
"hostname": {
"type": "text"
},
"uptimeSeconds": {
"type": "integer"
},
"ip": {
"type": "text"
},
"packageManager": {
"type": "text"
},
"collectedAt": {
"type": "text",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_fleet_inventory_host",
"columns": ["hostId", "userId"],
"unique": true
},
{
"name": "idx_fleet_inventory_user",
"columns": ["userId"]
}
],
"adopts": "fleet_inventory"
}
}
}