Skip to content

Commit

Permalink
* Try again with the migrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgroff committed Nov 21, 2018
1 parent 7201028 commit c0b618c
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 24 deletions.
5 changes: 1 addition & 4 deletions django_kala/auth/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.0.8 on 2018-11-21 03:35
# Generated by Django 2.0.8 on 2018-11-21 03:41

import auth.models
import django.contrib.auth.validators
Expand All @@ -14,7 +14,6 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('organizations', '__first__'),
('auth', '0011_auto_20181002_0231'),
]

Expand Down Expand Up @@ -46,8 +45,6 @@ class Migration(migrations.Migration):
('removed', models.DateField(null=True)),
('avatar_url', models.URLField(max_length=1200)),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
('organizations', models.ManyToManyField(to='organizations.Organization')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
],
options={
'ordering': ['first_name', 'last_name'],
Expand Down
27 changes: 27 additions & 0 deletions django_kala/auth/migrations/0002_auto_20181121_0341.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Generated by Django 2.0.8 on 2018-11-21 03:41

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
('kala_auth', '0001_initial'),
('auth', '0011_auto_20181002_0231'),
('organizations', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='user',
name='organizations',
field=models.ManyToManyField(to='organizations.Organization'),
),
migrations.AddField(
model_name='user',
name='user_permissions',
field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
),
]
19 changes: 3 additions & 16 deletions django_kala/documents/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Generated by Django 2.0.8 on 2018-11-21 03:37
# Generated by Django 2.0.8 on 2018-11-21 03:41

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import taggit.managers
import uuid


Expand All @@ -13,10 +11,6 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('taggit', '0002_auto_20150616_2121'),
('auth', '0011_auto_20181002_0231'),
('projects', '0001_initial'),
]

operations = [
Expand All @@ -30,22 +24,16 @@ class Migration(migrations.Migration):
('mime', models.CharField(max_length=255, null=True)),
('is_active', models.BooleanField(default=True)),
('uuid', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, unique=True)),
('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='projects.Category')),
('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project')),
('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
],
options={
'db_table': 'kala_documents',
'ordering': ['-date', 'name'],
'db_table': 'kala_documents',
},
),
migrations.CreateModel(
name='DocumentPermission',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('document', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='documents.Document')),
('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Permission')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
Expand All @@ -61,12 +49,11 @@ class Migration(migrations.Migration):
('mime', models.CharField(max_length=255, null=True)),
('name', models.CharField(max_length=255)),
('document', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='documents.Document')),
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
options={
'db_table': 'kala_document_version',
'get_latest_by': 'created',
'ordering': ['name', 'created'],
'db_table': 'kala_document_version',
},
),
]
39 changes: 39 additions & 0 deletions django_kala/documents/migrations/0002_auto_20181121_0341.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by Django 2.0.8 on 2018-11-21 03:41

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('documents', '0001_initial'),
('auth', '0011_auto_20181002_0231'),
]

operations = [
migrations.AddField(
model_name='documentversion',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='documentpermission',
name='document',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='documents.Document'),
),
migrations.AddField(
model_name='documentpermission',
name='permission',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.Permission'),
),
migrations.AddField(
model_name='documentpermission',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]
34 changes: 34 additions & 0 deletions django_kala/documents/migrations/0003_auto_20181121_0341.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Generated by Django 2.0.8 on 2018-11-21 03:41

from django.db import migrations, models
import django.db.models.deletion
import taggit.managers


class Migration(migrations.Migration):

initial = True

dependencies = [
('projects', '0001_initial'),
('taggit', '0002_auto_20150616_2121'),
('documents', '0002_auto_20181121_0341'),
]

operations = [
migrations.AddField(
model_name='document',
name='category',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='projects.Category'),
),
migrations.AddField(
model_name='document',
name='project',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project'),
),
migrations.AddField(
model_name='document',
name='tags',
field=taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags'),
),
]
2 changes: 1 addition & 1 deletion django_kala/organizations/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.0.8 on 2018-11-21 03:37
# Generated by Django 2.0.8 on 2018-11-21 03:41

from django.conf import settings
from django.db import migrations, models
Expand Down
6 changes: 3 additions & 3 deletions django_kala/projects/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.0.8 on 2018-11-21 03:36
# Generated by Django 2.0.8 on 2018-11-21 03:41

from django.conf import settings
import django.contrib.postgres.fields.jsonb
Expand All @@ -14,9 +14,9 @@ class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('organizations', '__first__'),
('taggit', '0002_auto_20150616_2121'),
('auth', '0011_auto_20181002_0231'),
('organizations', '0001_initial'),
]

operations = [
Expand Down Expand Up @@ -53,8 +53,8 @@ class Migration(migrations.Migration):
('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
],
options={
'db_table': 'kala_projects',
'ordering': ('name',),
'db_table': 'kala_projects',
},
),
migrations.CreateModel(
Expand Down

0 comments on commit c0b618c

Please sign in to comment.