mirror of
https://github.com/ferdzo/iotDashboard.git
synced 2026-06-04 00:16:46 +00:00
83 lines
3.3 KiB
Python
83 lines
3.3 KiB
Python
# Generated by Django 5.2.7 on 2025-11-19 22:57
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('iotDashboard', '0002_sensortype_remove_device_humidity_and_more'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='DeviceCertificate',
|
|
fields=[
|
|
('id', models.CharField(max_length=255, primary_key=True, serialize=False)),
|
|
('certificate_pem', models.TextField()),
|
|
('private_key_pem', models.TextField(blank=True, null=True)),
|
|
('issued_at', models.DateTimeField()),
|
|
('expires_at', models.DateTimeField()),
|
|
('revoked_at', models.DateTimeField(blank=True, null=True)),
|
|
],
|
|
options={
|
|
'db_table': 'device_certificates',
|
|
'managed': False,
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='DeviceCredential',
|
|
fields=[
|
|
('id', models.CharField(max_length=255, primary_key=True, serialize=False)),
|
|
('credential_type', models.CharField(max_length=50)),
|
|
('credential_hash', models.TextField()),
|
|
('created_at', models.DateTimeField()),
|
|
('expires_at', models.DateTimeField(blank=True, null=True)),
|
|
('revoked_at', models.DateTimeField(blank=True, null=True)),
|
|
],
|
|
options={
|
|
'db_table': 'device_credentials',
|
|
'managed': False,
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='Telemetry',
|
|
fields=[
|
|
('time', models.DateTimeField(primary_key=True, serialize=False)),
|
|
('device_id', models.CharField(db_column='device_id', max_length=255)),
|
|
('metric', models.CharField(max_length=255)),
|
|
('value', models.FloatField()),
|
|
('unit', models.CharField(blank=True, max_length=50, null=True)),
|
|
],
|
|
options={
|
|
'db_table': 'telemetry',
|
|
'managed': False,
|
|
},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='device',
|
|
options={'managed': False},
|
|
),
|
|
migrations.CreateModel(
|
|
name='DashboardLayout',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(default='default', help_text="Layout name (e.g., 'default', 'mobile', 'work')", max_length=255, unique=True)),
|
|
('config', models.JSONField(help_text='Full dashboard configuration JSON')),
|
|
('is_default', models.BooleanField(default=True, help_text='Whether this is the default layout')),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
'db_table': 'dashboard_layouts',
|
|
'indexes': [models.Index(fields=['is_default'], name='dashboard_l_is_defa_033b71_idx'), models.Index(fields=['name'], name='dashboard_l_name_c36020_idx')],
|
|
},
|
|
),
|
|
migrations.DeleteModel(
|
|
name='Sensor',
|
|
),
|
|
migrations.DeleteModel(
|
|
name='SensorType',
|
|
),
|
|
]
|