![]() ![]() The above exception was the direct cause of the following exception:įile "C:\Users\\source\repos\Artemis\manage.py", line 25, in įile "C:\Users\\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\_init_.py", line 419, in execute_from_command_lineįile "C:\Users\\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\_init_.py", line 413, in execute Sqlite3.OperationalError: foreign key mismatch - "tenant_engagement" referencing "tenant_tenant" IPython mode requires IPython 0.11 or later: No module named 'IPython'Īpply all migrations: admin, auth, contenttypes, scan_manager, sessions, tenantĪpplying tenant.0006_auto_20210606_2024.Traceback (most recent call last):įile "C:\Users\\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 82, in _executeįile "C:\Users\\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\base.py", line 421, in execute Makemigrations Executing manage.py makemigrations ![]() Value = models.CharField(max_length=100, choices=scope_item_type)ĭiscovered = models.BooleanField(default = False)Įngagement = models.ForeignKey(Engagement, on_delete=models.CASCADE) ![]() Scope_id = models.AutoField(primary_key=True) Tenant_id = models.ForeignKey(Tenant, on_delete=models.CASCADE) Status = models.CharField(max_length=20, choices=engagement_status) Start_date = models.DateTimeField(auto_now_add=True) Type = models.CharField(max_length=20, choices=engagement_types)Įngagement_id = models.AutoField(primary_key=True) Tenant_id = models.AutoField(primary_key=True) Name = models.CharField(max_length = 20, unique=True) Scope_item is an example data source from django.db import models Engagements will then have multiple context sources linking to that.Īll models at the moment are in the same models.py document. Each Tenant can have multiple Engagements. Using django, SQLite and visual studio to build it.ĭata model structure is Tenant at the top of the tree. The first tenant model seems to work great but as I move a layer down I can't seem to get the relationships to work correctly. I'm stuck on a "foreign key mismatch" when trying to build a base CRM web application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |