1- # Generated by Django 4.2.29 on 2026-03-17 01:54
1+ # Generated by Django 4.2.29 on 2026-03-19 08:51
22
33from django .db import migrations , models
4- import django .db .models .deletion
54import uuid
65
76
@@ -13,40 +12,6 @@ class Migration(migrations.Migration):
1312 ]
1413
1514 operations = [
16- migrations .CreateModel (
17- name = 'DatabaseConnection' ,
18- fields = [
19- ('id' , models .UUIDField (default = uuid .uuid4 , editable = False , primary_key = True , serialize = False )),
20- ('name' , models .CharField (max_length = 255 , unique = True )),
21- ('host' , models .CharField (max_length = 255 )),
22- ('port' , models .IntegerField (default = 5432 )),
23- ('database' , models .CharField (max_length = 255 )),
24- ('username' , models .CharField (max_length = 255 )),
25- ('password' , models .CharField (max_length = 255 )),
26- ('created_at' , models .DateTimeField (auto_now_add = True )),
27- ('updated_at' , models .DateTimeField (auto_now = True )),
28- ('is_active' , models .BooleanField (default = True )),
29- ],
30- options = {
31- 'db_table' : 'database_connections' ,
32- 'ordering' : ['-created_at' ],
33- },
34- ),
35- migrations .CreateModel (
36- name = 'SchemaDocument' ,
37- fields = [
38- ('id' , models .UUIDField (default = uuid .uuid4 , editable = False , primary_key = True , serialize = False )),
39- ('name' , models .CharField (max_length = 255 )),
40- ('content' , models .TextField ()),
41- ('embeddings' , models .TextField (blank = True , null = True )),
42- ('uploaded_at' , models .DateTimeField (auto_now_add = True )),
43- ('connection' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , related_name = 'documents' , to = 'core.databaseconnection' )),
44- ],
45- options = {
46- 'db_table' : 'schema_documents' ,
47- 'ordering' : ['-uploaded_at' ],
48- },
49- ),
5015 migrations .CreateModel (
5116 name = 'QueryHistory' ,
5217 fields = [
@@ -57,7 +22,6 @@ class Migration(migrations.Migration):
5722 ('result' , models .JSONField (blank = True , null = True )),
5823 ('error' , models .TextField (blank = True , null = True )),
5924 ('created_at' , models .DateTimeField (auto_now_add = True )),
60- ('connection' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , related_name = 'queries' , to = 'core.databaseconnection' )),
6125 ],
6226 options = {
6327 'db_table' : 'query_history' ,
0 commit comments