Make models managed

This commit is contained in:
Jan Dittberner 2024-09-18 17:27:42 +02:00
parent 32bc919530
commit 3a1796b1ed
2 changed files with 69 additions and 14 deletions

View file

@ -0,0 +1,69 @@
# Generated by Django 4.2.16 on 2024-09-18 16:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("cats", "0002_convert_to_utf8_and_innodb"),
]
operations = [
migrations.AlterModelOptions(
name="answer",
options={},
),
migrations.AlterModelOptions(
name="incorrectanswer",
options={},
),
migrations.AlterModelOptions(
name="learnprogress",
options={},
),
migrations.AlterModelOptions(
name="question",
options={},
),
migrations.AlterModelOptions(
name="questiondescription",
options={},
),
migrations.AlterModelOptions(
name="questiontype",
options={},
),
migrations.AlterModelOptions(
name="questiontypev2",
options={},
),
migrations.AlterModelOptions(
name="schemaversion",
options={},
),
migrations.AlterModelOptions(
name="statistics",
options={},
),
migrations.AlterModelOptions(
name="topictype",
options={},
),
migrations.AlterModelOptions(
name="temp",
options={},
),
migrations.AlterModelOptions(
name="topic",
options={},
),
migrations.AlterModelOptions(
name="user",
options={},
),
migrations.AlterModelOptions(
name="useraddress",
options={},
),
]

View file

@ -16,7 +16,6 @@ class Answer(models.Model):
ref_a_id = models.IntegerField(blank=True, null=True) ref_a_id = models.IntegerField(blank=True, null=True)
class Meta: class Meta:
managed = False
db_table = 'answers' db_table = 'answers'
@ -25,7 +24,6 @@ class IncorrectAnswer(models.Model):
q_id = models.IntegerField() q_id = models.IntegerField()
class Meta: class Meta:
managed = False
db_table = 'answers_incorrect' db_table = 'answers_incorrect'
unique_together = (('lp_id', 'q_id'),) unique_together = (('lp_id', 'q_id'),)
@ -44,7 +42,6 @@ class LearnProgress(models.Model):
passed = models.IntegerField() passed = models.IntegerField()
class Meta: class Meta:
managed = False
db_table = 'learnprogress' db_table = 'learnprogress'
@ -53,7 +50,6 @@ class QuestionDescription(models.Model):
description = models.TextField() description = models.TextField()
class Meta: class Meta:
managed = False
db_table = 'question_description' db_table = 'question_description'
@ -68,7 +64,6 @@ class Question(models.Model):
translationstatus = models.IntegerField(blank=True, null=True) translationstatus = models.IntegerField(blank=True, null=True)
class Meta: class Meta:
managed = False
db_table = 'questions' db_table = 'questions'
db_table_comment = 'Fragen' db_table_comment = 'Fragen'
@ -80,7 +75,6 @@ class QuestionType(models.Model):
fr = models.CharField(db_column='FR', max_length=25, blank=True, null=True) # Field name made lowercase. fr = models.CharField(db_column='FR', max_length=25, blank=True, null=True) # Field name made lowercase.
class Meta: class Meta:
managed = False
db_table = 'questiontype' db_table = 'questiontype'
db_table_comment = 'Fragetypen' db_table_comment = 'Fragetypen'
@ -91,7 +85,6 @@ class QuestionTypeV2(models.Model):
qt_desc = models.CharField(max_length=25, db_comment='Fragetyp') qt_desc = models.CharField(max_length=25, db_comment='Fragetyp')
class Meta: class Meta:
managed = False
db_table = 'questiontype_v2' db_table = 'questiontype_v2'
unique_together = (('qt_id', 'lang'),) unique_together = (('qt_id', 'lang'),)
db_table_comment = 'Fragetypen' db_table_comment = 'Fragetypen'
@ -102,7 +95,6 @@ class SchemaVersion(models.Model):
when = models.DateTimeField() when = models.DateTimeField()
class Meta: class Meta:
managed = False
db_table = 'schema_version' db_table = 'schema_version'
@ -112,7 +104,6 @@ class Statistics(models.Model):
count = models.IntegerField(db_comment='Zählen von Antworten') count = models.IntegerField(db_comment='Zählen von Antworten')
class Meta: class Meta:
managed = False
db_table = 'statistics' db_table = 'statistics'
@ -121,7 +112,6 @@ class Temp(models.Model):
number = models.IntegerField(blank=True, null=True) number = models.IntegerField(blank=True, null=True)
class Meta: class Meta:
managed = False
db_table = 'temp' db_table = 'temp'
@ -130,7 +120,6 @@ class TopicType(models.Model):
text = models.CharField(max_length=255) text = models.CharField(max_length=255)
class Meta: class Meta:
managed = False
db_table = 'topic_type' db_table = 'topic_type'
@ -144,7 +133,6 @@ class Topic(models.Model):
type_id = models.IntegerField(blank=True, null=True) type_id = models.IntegerField(blank=True, null=True)
class Meta: class Meta:
managed = False
db_table = 'topics' db_table = 'topics'
db_table_comment = 'Themen' db_table_comment = 'Themen'
@ -159,7 +147,6 @@ class User(models.Model):
root = models.CharField(max_length=45) root = models.CharField(max_length=45)
class Meta: class Meta:
managed = False
db_table = 'user' db_table = 'user'
unique_together = (('user_id', 'root'),) unique_together = (('user_id', 'root'),)
@ -177,6 +164,5 @@ class UserAddress(models.Model):
country = models.CharField(max_length=50) country = models.CharField(max_length=50)
class Meta: class Meta:
managed = False
db_table = 'user_address' db_table = 'user_address'
unique_together = (('user_id', 'root'),) unique_together = (('user_id', 'root'),)