@@ -34,8 +34,8 @@ class Migration(migrations.Migration):
3434 fields = [
3535 ('id' , models .AutoField (serialize = False , primary_key = True )),
3636 ('distribution' , models .PositiveSmallIntegerField (default = 0 , choices = [(0 , 'side by side (1/2)' ), (1 , 'side by side (2/3|1/3)' ), (2 , 'side by side (1/3|2/3)' )])),
37- ('chart_1' , models .ForeignKey (related_name = 'chart_1' , verbose_name = 'left Chart' , blank = True , to = 'hmi.Chart' , null = True )),
38- ('chart_2' , models .ForeignKey (related_name = 'chart_2' , verbose_name = 'right Chart' , blank = True , to = 'hmi.Chart' , null = True )),
37+ ('chart_1' , models .ForeignKey (related_name = 'chart_1' , verbose_name = 'left Chart' , blank = True , to = 'hmi.Chart' , null = True , on_delete = models . SET_NULL )),
38+ ('chart_2' , models .ForeignKey (related_name = 'chart_2' , verbose_name = 'right Chart' , blank = True , to = 'hmi.Chart' , null = True , on_delete = models . SET_NULL )),
3939 ],
4040 options = {
4141 },
@@ -98,7 +98,7 @@ class Migration(migrations.Migration):
9898 ('charts' , models .ManyToManyField (to = 'hmi.Chart' , blank = True )),
9999 ('control_items' , models .ManyToManyField (to = 'hmi.ControlItem' , blank = True )),
100100 ('custom_html_panels' , models .ManyToManyField (to = 'hmi.CustomHTMLPanel' , blank = True )),
101- ('hmi_group' , models .OneToOneField (to = 'auth.Group' )),
101+ ('hmi_group' , models .OneToOneField (to = 'auth.Group' , on_delete = models . SET_NULL )),
102102 ],
103103 options = {
104104 },
@@ -111,7 +111,7 @@ class Migration(migrations.Migration):
111111 ('short_name' , models .CharField (default = '' , max_length = 80 , verbose_name = 'variable short name' )),
112112 ('chart_line_thickness' , models .PositiveSmallIntegerField (default = 3 , choices = [(3 , '3Px' )])),
113113 ('chart_line_color' , models .ForeignKey (on_delete = django .db .models .deletion .SET_NULL , default = None , to = 'hmi.Color' , null = True )),
114- ('hmi_variable' , models .OneToOneField (to = 'pyscada.Variable' )),
114+ ('hmi_variable' , models .OneToOneField (to = 'pyscada.Variable' , on_delete = models . SET_NULL )),
115115 ],
116116 options = {
117117 },
@@ -137,7 +137,7 @@ class Migration(migrations.Migration):
137137 ('title' , models .CharField (default = '' , max_length = 400 )),
138138 ('position' , models .PositiveSmallIntegerField (default = 0 , choices = [(0 , 'Control Menu' ), (1 , 'left' ), (2 , 'right' )])),
139139 ('visable' , models .BooleanField (default = True )),
140- ('control_panel' , models .ForeignKey (default = None , blank = True , to = 'hmi.ControlPanel' , null = True )),
140+ ('control_panel' , models .ForeignKey (default = None , blank = True , to = 'hmi.ControlPanel' , null = True , on_delete = models . SET_NULL )),
141141 ],
142142 options = {
143143 },
@@ -170,10 +170,10 @@ class Migration(migrations.Migration):
170170 ('col' , models .PositiveSmallIntegerField (default = 0 , choices = [(0 , '1. col' ), (1 , '2. col' ), (2 , '3. col' ), (3 , '4. col' )])),
171171 ('size' , models .PositiveSmallIntegerField (default = 4 , choices = [(4 , 'page width' ), (3 , '3/4 page width' ), (2 , '1/2 page width' ), (1 , '1/4 page width' )])),
172172 ('visable' , models .BooleanField (default = True )),
173- ('chart' , models .ForeignKey (default = None , blank = True , to = 'hmi.Chart' , null = True )),
174- ('chart_set' , models .ForeignKey (default = None , blank = True , to = 'hmi.ChartSet' , null = True )),
175- ('control_panel' , models .ForeignKey (default = None , blank = True , to = 'hmi.ControlPanel' , null = True )),
176- ('custom_html_panel' , models .ForeignKey (default = None , blank = True , to = 'hmi.CustomHTMLPanel' , null = True )),
173+ ('chart' , models .ForeignKey (default = None , blank = True , to = 'hmi.Chart' , null = True , on_delete = models . SET_NULL )),
174+ ('chart_set' , models .ForeignKey (default = None , blank = True , to = 'hmi.ChartSet' , null = True , on_delete = models . SET_NULL )),
175+ ('control_panel' , models .ForeignKey (default = None , blank = True , to = 'hmi.ControlPanel' , null = True , on_delete = models . SET_NULL )),
176+ ('custom_html_panel' , models .ForeignKey (default = None , blank = True , to = 'hmi.CustomHTMLPanel' , null = True , on_delete = models . SET_NULL )),
177177 ('page' , models .ForeignKey (on_delete = django .db .models .deletion .SET_NULL , default = None , to = 'hmi.Page' , null = True )),
178178 ],
179179 options = {
0 commit comments