From cf2cdb61f5f2636f8b46d1ea43fd15167b1ab5b5 Mon Sep 17 00:00:00 2001 From: revelis-vincenzo Date: Tue, 21 Nov 2023 16:56:44 +0100 Subject: [PATCH] fix: cdswebsites exstudents links sliders --- ..._sitowebcdsexstudenti_sitowebcdslink_sitowebcdsslider.py | 2 +- ricerca_app/migrations/0105_auto_20230419_1540.py | 4 ++-- ricerca_app/models.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ricerca_app/migrations/0101_sitowebcdsdatibase_sitowebcdsdatiexceltmp_sitowebcdsexstudenti_sitowebcdslink_sitowebcdsslider.py b/ricerca_app/migrations/0101_sitowebcdsdatibase_sitowebcdsdatiexceltmp_sitowebcdsexstudenti_sitowebcdslink_sitowebcdsslider.py index 90582634..1baeeaa8 100644 --- a/ricerca_app/migrations/0101_sitowebcdsdatibase_sitowebcdsdatiexceltmp_sitowebcdsexstudenti_sitowebcdslink_sitowebcdsslider.py +++ b/ricerca_app/migrations/0101_sitowebcdsdatibase_sitowebcdsdatiexceltmp_sitowebcdsexstudenti_sitowebcdslink_sitowebcdsslider.py @@ -139,7 +139,7 @@ class Migration(migrations.Migration): ('descrizione_link_en', models.CharField(blank=True, db_column='DESCRIZIONE_LINK_EN', max_length=2000, null=True)), ('link_it', models.CharField(blank=True, db_column='LINK_IT', max_length=2000, null=True)), ('link_en', models.CharField(blank=True, db_column='LINK_EN', max_length=2000, null=True)), - ('id_sito_web_cds_dati_base', models.IntegerField(db_column='ID_SITO_WEB_CDS_DATI_BASE')), + ('id_sito_web_cds_dati_base', models.ForeignKey(db_column='ID_SITO_WEB_CDS_DATI_BASE', on_delete=django.db.models.deletion.CASCADE, to='ricerca_app.sitowebcdsdatibase')), ('dt_mod', models.DateField(blank=True, db_column='DT_MOD', null=True)), ('id_user_mod', models.ForeignKey(blank=True, db_column='ID_USER_MOD', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)), ], diff --git a/ricerca_app/migrations/0105_auto_20230419_1540.py b/ricerca_app/migrations/0105_auto_20230419_1540.py index 53fdc419..6987208d 100644 --- a/ricerca_app/migrations/0105_auto_20230419_1540.py +++ b/ricerca_app/migrations/0105_auto_20230419_1540.py @@ -63,7 +63,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='sitowebcdsexstudenti', name='id_sito_web_cds_dati_base', - field=models.ForeignKey(db_column='ID_SITO_WEB_CDS_DATI_BASE', on_delete=django.db.models.deletion.DO_NOTHING, to='ricerca_app.sitowebcdsdatibase'), + field=models.ForeignKey(db_column='ID_SITO_WEB_CDS_DATI_BASE', on_delete=django.db.models.deletion.CASCADE, to='ricerca_app.sitowebcdsdatibase'), ), migrations.AlterField( model_name='sitowebcdsexstudenti', @@ -78,7 +78,7 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='sitowebcdsslider', name='id_sito_web_cds_dati_base', - field=models.ForeignKey(blank=True, db_column='ID_SITO_WEB_CDS_DATI_BASE', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='ricerca_app.sitowebcdsdatibase'), + field=models.ForeignKey(blank=True, db_column='ID_SITO_WEB_CDS_DATI_BASE', null=True, on_delete=django.db.models.deletion.CASCADE, to='ricerca_app.sitowebcdsdatibase'), ), migrations.AlterField( model_name='sitowebcdsslider', diff --git a/ricerca_app/models.py b/ricerca_app/models.py index 181ed135..ca3e9c5a 100644 --- a/ricerca_app/models.py +++ b/ricerca_app/models.py @@ -4088,7 +4088,7 @@ class SitoWebCdsExStudenti(models.Model): profilo_en = models.TextField(db_column='PROFILO_EN', blank=True, null=True) # Field name made lowercase. link_it = models.CharField(db_column='LINK_IT', max_length=2000, blank=True, null=True) # Field name made lowercase. link_en = models.CharField(db_column='LINK_EN', max_length=2000, blank=True, null=True) # Field name made lowercase. - id_sito_web_cds_dati_base = models.ForeignKey(SitoWebCdsDatiBase, models.DO_NOTHING, db_column='ID_SITO_WEB_CDS_DATI_BASE', to_field='id') # Field name made lowercase. + id_sito_web_cds_dati_base = models.ForeignKey(SitoWebCdsDatiBase, models.CASCADE, db_column='ID_SITO_WEB_CDS_DATI_BASE', to_field='id') # Field name made lowercase. dt_mod = models.DateField(db_column='DT_MOD', blank=True, null=True) # Field name made lowercase. id_user_mod = models.ForeignKey(get_user_model(), on_delete=models.DO_NOTHING, db_column='ID_USER_MOD', blank=True, null=True) # Field name made lowercase. foto = models.FileField( @@ -4112,7 +4112,7 @@ class SitoWebCdsLink(models.Model): descrizione_link_en = models.CharField(db_column='DESCRIZIONE_LINK_EN', max_length=2000, blank=True, null=True) # Field name made lowercase. link_it = models.CharField(db_column='LINK_IT', max_length=2000, blank=True, null=True) # Field name made lowercase. link_en = models.CharField(db_column='LINK_EN', max_length=2000, blank=True, null=True) # Field name made lowercase. - id_sito_web_cds_dati_base = models.IntegerField(db_column='ID_SITO_WEB_CDS_DATI_BASE') # Field name made lowercase. + id_sito_web_cds_dati_base = models.ForeignKey(SitoWebCdsDatiBase, models.CASCADE, db_column='ID_SITO_WEB_CDS_DATI_BASE', to_field='id') # Field name made lowercase. dt_mod = models.DateField(db_column='DT_MOD', blank=True, null=True) # Field name made lowercase. id_user_mod = models.ForeignKey(get_user_model(), on_delete=models.DO_NOTHING, db_column='ID_USER_MOD', blank=True, null=True) # Field name made lowercase. @@ -4123,7 +4123,7 @@ class Meta: class SitoWebCdsSlider(models.Model): id = models.AutoField(db_column='ID', primary_key=True) # Field name made lowercase. - id_sito_web_cds_dati_base = models.ForeignKey(SitoWebCdsDatiBase, models.DO_NOTHING, db_column='ID_SITO_WEB_CDS_DATI_BASE', blank=True, null=True, to_field='id') # Field name made lowercase. + id_sito_web_cds_dati_base = models.ForeignKey(SitoWebCdsDatiBase, models.CASCADE, db_column='ID_SITO_WEB_CDS_DATI_BASE', blank=True, null=True, to_field='id') # Field name made lowercase. ordine = models.IntegerField(db_column='ORDINE', blank=True, null=True) # Field name made lowercase. slider_it = models.TextField(db_column='SLIDER_IT', blank=True, null=True) # Field name made lowercase. slider_en = models.TextField(db_column='SLIDER_EN', blank=True, null=True) # Field name made lowercase.