-
Notifications
You must be signed in to change notification settings - Fork 0
/
allmodels.py
251 lines (191 loc) · 8.77 KB
/
allmodels.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models
class AuthGroup(models.Model):
name = models.CharField(unique=True, max_length=150)
class Meta:
managed = False
db_table = 'auth_group'
class AuthGroupPermissions(models.Model):
group = models.ForeignKey(AuthGroup, models.DO_NOTHING)
permission = models.ForeignKey('AuthPermission', models.DO_NOTHING)
class Meta:
managed = False
db_table = 'auth_group_permissions'
unique_together = (('group', 'permission'),)
class AuthPermission(models.Model):
content_type = models.ForeignKey('DjangoContentType', models.DO_NOTHING)
codename = models.CharField(max_length=100)
name = models.CharField(max_length=255)
class Meta:
managed = False
db_table = 'auth_permission'
unique_together = (('content_type', 'codename'),)
class Board(models.Model):
name = models.CharField(unique=True, max_length=50)
description = models.CharField(max_length=500)
class Meta:
managed = False
db_table = 'board'
class DjangoAdminLog(models.Model):
action_time = models.DateTimeField()
object_id = models.TextField(blank=True, null=True)
object_repr = models.CharField(max_length=200)
change_message = models.TextField()
content_type = models.ForeignKey('DjangoContentType', models.DO_NOTHING, blank=True, null=True)
user = models.ForeignKey('User', models.DO_NOTHING)
action_flag = models.PositiveSmallIntegerField()
class Meta:
managed = False
db_table = 'django_admin_log'
class DjangoCeleryBeatClockedschedule(models.Model):
clocked_time = models.DateTimeField()
enabled = models.BooleanField()
class Meta:
managed = False
db_table = 'django_celery_beat_clockedschedule'
class DjangoCeleryBeatCrontabschedule(models.Model):
minute = models.CharField(max_length=240)
hour = models.CharField(max_length=96)
day_of_week = models.CharField(max_length=64)
day_of_month = models.CharField(max_length=124)
month_of_year = models.CharField(max_length=64)
timezone = models.CharField(max_length=63)
class Meta:
managed = False
db_table = 'django_celery_beat_crontabschedule'
class DjangoCeleryBeatIntervalschedule(models.Model):
every = models.IntegerField()
period = models.CharField(max_length=24)
class Meta:
managed = False
db_table = 'django_celery_beat_intervalschedule'
class DjangoCeleryBeatPeriodictask(models.Model):
name = models.CharField(unique=True, max_length=200)
task = models.CharField(max_length=200)
args = models.TextField()
kwargs = models.TextField()
queue = models.CharField(max_length=200, blank=True, null=True)
exchange = models.CharField(max_length=200, blank=True, null=True)
routing_key = models.CharField(max_length=200, blank=True, null=True)
expires = models.DateTimeField(blank=True, null=True)
enabled = models.BooleanField()
last_run_at = models.DateTimeField(blank=True, null=True)
total_run_count = models.PositiveIntegerField()
date_changed = models.DateTimeField()
description = models.TextField()
crontab = models.ForeignKey(DjangoCeleryBeatCrontabschedule, models.DO_NOTHING, blank=True, null=True)
interval = models.ForeignKey(DjangoCeleryBeatIntervalschedule, models.DO_NOTHING, blank=True, null=True)
solar = models.ForeignKey('DjangoCeleryBeatSolarschedule', models.DO_NOTHING, blank=True, null=True)
one_off = models.BooleanField()
start_time = models.DateTimeField(blank=True, null=True)
priority = models.PositiveIntegerField(blank=True, null=True)
headers = models.TextField()
clocked = models.ForeignKey(DjangoCeleryBeatClockedschedule, models.DO_NOTHING, blank=True, null=True)
expire_seconds = models.PositiveIntegerField(blank=True, null=True)
class Meta:
managed = False
db_table = 'django_celery_beat_periodictask'
class DjangoCeleryBeatPeriodictasks(models.Model):
ident = models.AutoField(primary_key=True)
last_update = models.DateTimeField()
class Meta:
managed = False
db_table = 'django_celery_beat_periodictasks'
class DjangoCeleryBeatSolarschedule(models.Model):
event = models.CharField(max_length=24)
latitude = models.DecimalField(max_digits=10, decimal_places=5) # max_digits and decimal_places have been guessed, as this database handles decimal fields as float
longitude = models.DecimalField(max_digits=10, decimal_places=5) # max_digits and decimal_places have been guessed, as this database handles decimal fields as float
class Meta:
managed = False
db_table = 'django_celery_beat_solarschedule'
unique_together = (('event', 'latitude', 'longitude'),)
class DjangoCeleryResultsTaskresult(models.Model):
task_id = models.CharField(unique=True, max_length=255)
status = models.CharField(max_length=50)
content_type = models.CharField(max_length=128)
content_encoding = models.CharField(max_length=64)
result = models.TextField(blank=True, null=True)
date_done = models.DateTimeField()
traceback = models.TextField(blank=True, null=True)
meta = models.TextField(blank=True, null=True)
task_args = models.TextField(blank=True, null=True)
task_kwargs = models.TextField(blank=True, null=True)
task_name = models.CharField(max_length=255, blank=True, null=True)
worker = models.CharField(max_length=100, blank=True, null=True)
date_created = models.DateTimeField()
class Meta:
managed = False
db_table = 'django_celery_results_taskresult'
class DjangoContentType(models.Model):
app_label = models.CharField(max_length=100)
model = models.CharField(max_length=100)
class Meta:
managed = False
db_table = 'django_content_type'
unique_together = (('app_label', 'model'),)
class DjangoMigrations(models.Model):
app = models.CharField(max_length=255)
name = models.CharField(max_length=255)
applied = models.DateTimeField()
class Meta:
managed = False
db_table = 'django_migrations'
class DjangoSession(models.Model):
session_key = models.CharField(primary_key=True, max_length=40)
session_data = models.TextField()
expire_date = models.DateTimeField()
class Meta:
managed = False
db_table = 'django_session'
class Post(models.Model):
created_at = models.DateTimeField()
updated_at = models.DateTimeField(blank=True, null=True)
created_by = models.ForeignKey('User', models.DO_NOTHING, db_column='created_by')
topic = models.ForeignKey('Topic', models.DO_NOTHING, db_column='topic')
updated_by = models.ForeignKey('User', models.DO_NOTHING, db_column='updated_by', blank=True, null=True)
message = models.TextField()
class Meta:
managed = False
db_table = 'post'
class Topic(models.Model):
subject = models.CharField(unique=True, max_length=50)
last_updated = models.DateTimeField()
board = models.ForeignKey(Board, models.DO_NOTHING, db_column='board')
user = models.ForeignKey('User', models.DO_NOTHING, db_column='user')
views = models.PositiveIntegerField()
class Meta:
managed = False
db_table = 'topic'
class User(models.Model):
password = models.CharField(max_length=128)
last_login = models.DateTimeField(blank=True, null=True)
is_superuser = models.BooleanField()
email = models.CharField(unique=True, max_length=254)
first_name = models.CharField(max_length=30, blank=True, null=True)
last_name = models.CharField(max_length=30, blank=True, null=True)
username = models.CharField(max_length=100, blank=True, null=True)
is_staff = models.BooleanField()
date_joined = models.DateTimeField()
class Meta:
managed = False
db_table = 'user'
class UserGroups(models.Model):
user = models.ForeignKey(User, models.DO_NOTHING)
group = models.ForeignKey(AuthGroup, models.DO_NOTHING)
class Meta:
managed = False
db_table = 'user_groups'
unique_together = (('user', 'group'),)
class UserUserPermissions(models.Model):
user = models.ForeignKey(User, models.DO_NOTHING)
permission = models.ForeignKey(AuthPermission, models.DO_NOTHING)
class Meta:
managed = False
db_table = 'user_user_permissions'
unique_together = (('user', 'permission'),)