mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
Add migrations for all existing models
When migrating on existing installations, run the python manage.py migrate --fake-initial command.
This commit is contained in:
48
pgweb/docs/migrations/0001_initial.py
Normal file
48
pgweb/docs/migrations/0001_initial.py
Normal file
@ -0,0 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('core', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='DocComment',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('version', models.DecimalField(max_digits=3, decimal_places=1)),
|
||||
('file', models.CharField(max_length=64)),
|
||||
('comment', models.TextField()),
|
||||
('posted_at', models.DateTimeField(auto_now_add=True)),
|
||||
('approved', models.BooleanField(default=False)),
|
||||
('submitter', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'ordering': ('-posted_at',),
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DocPage',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, primary_key=True)),
|
||||
('file', models.CharField(max_length=64)),
|
||||
('title', models.CharField(max_length=256, null=True, blank=True)),
|
||||
('content', models.TextField(null=True, blank=True)),
|
||||
('version', models.ForeignKey(to='core.Version', db_column=b'version', to_field=b'tree')),
|
||||
],
|
||||
options={
|
||||
'db_table': 'docs',
|
||||
},
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='docpage',
|
||||
unique_together=set([('file', 'version')]),
|
||||
),
|
||||
]
|
0
pgweb/docs/migrations/__init__.py
Normal file
0
pgweb/docs/migrations/__init__.py
Normal file
Reference in New Issue
Block a user