Merge pull request #1580 from ostcar/migrations
Added initial migrations for all apps
This commit is contained in:
commit
a6659e06a2
61
openslides/agenda/migrations/0001_initial.py
Normal file
61
openslides/agenda/migrations/0001_initial.py
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import openslides.utils.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('core', '0001_initial'),
|
||||||
|
('contenttypes', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Item',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
|
||||||
|
('item_number', models.CharField(blank=True, max_length=255, verbose_name='Number')),
|
||||||
|
('title', models.CharField(max_length=255, verbose_name='Title', null=True)),
|
||||||
|
('text', models.TextField(blank=True, verbose_name='Text', null=True)),
|
||||||
|
('comment', models.TextField(blank=True, verbose_name='Comment', null=True)),
|
||||||
|
('closed', models.BooleanField(default=False, verbose_name='Closed')),
|
||||||
|
('type', models.IntegerField(
|
||||||
|
verbose_name='Type',
|
||||||
|
default=1,
|
||||||
|
choices=[(1, 'Agenda item'), (2, 'Organizational item')],
|
||||||
|
max_length=1)),
|
||||||
|
('duration', models.CharField(blank=True, max_length=5, null=True)),
|
||||||
|
('weight', models.IntegerField(default=0, verbose_name='Weight')),
|
||||||
|
('object_id', models.PositiveIntegerField(blank=True, null=True)),
|
||||||
|
('speaker_list_closed', models.BooleanField(default=False, verbose_name='List of speakers is closed')),
|
||||||
|
('content_type', models.ForeignKey(blank=True, to='contenttypes.ContentType', null=True)),
|
||||||
|
('parent', models.ForeignKey(related_name='children', blank=True, to='agenda.Item', null=True)),
|
||||||
|
('tags', models.ManyToManyField(blank=True, to='core.Tag')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'permissions': (
|
||||||
|
('can_see', 'Can see agenda'),
|
||||||
|
('can_manage', 'Can manage agenda'),
|
||||||
|
('can_see_orga_items', 'Can see orga items and time scheduling of agenda')),
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Speaker',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
|
||||||
|
('begin_time', models.DateTimeField(null=True)),
|
||||||
|
('end_time', models.DateTimeField(null=True)),
|
||||||
|
('weight', models.IntegerField(null=True)),
|
||||||
|
('item', models.ForeignKey(to='agenda.Item')),
|
||||||
|
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'permissions': (('can_be_speaker', 'Can put oneself on the list of speakers'),),
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
]
|
0
openslides/agenda/migrations/__init__.py
Normal file
0
openslides/agenda/migrations/__init__.py
Normal file
119
openslides/assignments/migrations/0001_initial.py
Normal file
119
openslides/assignments/migrations/0001_initial.py
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import openslides.utils.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0001_initial'),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Assignment',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('title', models.CharField(max_length=100, verbose_name='Title')),
|
||||||
|
('description', models.TextField(blank=True, verbose_name='Description')),
|
||||||
|
('open_posts', models.PositiveSmallIntegerField(verbose_name='Number of members to be elected')),
|
||||||
|
('poll_description_default', models.CharField(
|
||||||
|
blank=True,
|
||||||
|
max_length=79,
|
||||||
|
verbose_name='Default comment on the ballot paper')),
|
||||||
|
('phase', models.IntegerField(
|
||||||
|
default=0,
|
||||||
|
choices=[(0, 'Searching for candidates'), (1, 'Voting'), (2, 'Finished')])),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Election',
|
||||||
|
'permissions': (
|
||||||
|
('can_see', 'Can see elections'),
|
||||||
|
('can_nominate_other', 'Can nominate another participant'),
|
||||||
|
('can_nominate_self', 'Can nominate oneself'),
|
||||||
|
('can_manage', 'Can manage elections')),
|
||||||
|
'ordering': ('title',),
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='AssignmentOption',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('candidate', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='AssignmentPoll',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('votesvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Valid votes')),
|
||||||
|
('votesinvalid', openslides.utils.models.MinMaxIntegerField(
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
verbose_name='Invalid votes')),
|
||||||
|
('votescast', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Votes cast')),
|
||||||
|
('published', models.BooleanField(default=False)),
|
||||||
|
('yesnoabstain', models.BooleanField(default=False)),
|
||||||
|
('description', models.CharField(blank=True, max_length=79, verbose_name='Comment on the ballot paper')),
|
||||||
|
('assignment', models.ForeignKey(related_name='polls', to='assignments.Assignment')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='AssignmentRelatedUser',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('status', models.IntegerField(default=1, choices=[(1, 'candidate'), (2, 'elected'), (3, 'blocked')])),
|
||||||
|
('assignment', models.ForeignKey(related_name='assignment_related_users', to='assignments.Assignment')),
|
||||||
|
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='AssignmentVote',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('weight', models.IntegerField(null=True, default=1)),
|
||||||
|
('value', models.CharField(null=True, max_length=255)),
|
||||||
|
('option', models.ForeignKey(to='assignments.AssignmentOption')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='assignmentrelateduser',
|
||||||
|
unique_together=set([('assignment', 'user')]),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='assignmentoption',
|
||||||
|
name='poll',
|
||||||
|
field=models.ForeignKey(to='assignments.AssignmentPoll'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='assignment',
|
||||||
|
name='related_users',
|
||||||
|
field=models.ManyToManyField(through='assignments.AssignmentRelatedUser', to=settings.AUTH_USER_MODEL),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='assignment',
|
||||||
|
name='tags',
|
||||||
|
field=models.ManyToManyField(blank=True, to='core.Tag'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
]
|
0
openslides/assignments/migrations/__init__.py
Normal file
0
openslides/assignments/migrations/__init__.py
Normal file
38
openslides/mediafiles/migrations/0001_initial.py
Normal file
38
openslides/mediafiles/migrations/0001_initial.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import openslides.utils.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Mediafile',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||||
|
('mediafile', models.FileField(upload_to='file', verbose_name='File')),
|
||||||
|
('title', models.CharField(unique=True, verbose_name='Title', max_length=255)),
|
||||||
|
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('filetype', models.CharField(editable=False, max_length=255)),
|
||||||
|
('is_presentable', models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
help_text='If checked, this file can be presented on the projector. '
|
||||||
|
'Currently, this is only possible for PDFs.',
|
||||||
|
verbose_name='Is Presentable')),
|
||||||
|
('uploader', models.ForeignKey(to=settings.AUTH_USER_MODEL, blank=True, verbose_name='Uploaded by', null=True)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'permissions': (
|
||||||
|
('can_see', 'Can see the list of files'),
|
||||||
|
('can_upload', 'Can upload files'),
|
||||||
|
('can_manage', 'Can manage files')),
|
||||||
|
'ordering': ['title'],
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
]
|
0
openslides/mediafiles/migrations/__init__.py
Normal file
0
openslides/mediafiles/migrations/__init__.py
Normal file
220
openslides/motions/migrations/0001_initial.py
Normal file
220
openslides/motions/migrations/0001_initial.py
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
import django.db.models.deletion
|
||||||
|
import jsonfield.fields
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import openslides.utils.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mediafiles', '__first__'),
|
||||||
|
('core', '0001_initial'),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Category',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255, verbose_name='Category name')),
|
||||||
|
('prefix', models.CharField(blank=True, max_length=32, verbose_name='Prefix')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ['prefix'],
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Motion',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('identifier', models.CharField(null=True, blank=True, max_length=255, unique=True)),
|
||||||
|
('identifier_number', models.IntegerField(null=True)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'permissions': (
|
||||||
|
('can_see', 'Can see motions'),
|
||||||
|
('can_create', 'Can create motions'),
|
||||||
|
('can_support', 'Can support motions'),
|
||||||
|
('can_manage', 'Can manage motions')),
|
||||||
|
'ordering': ('identifier',),
|
||||||
|
'verbose_name': 'Motion',
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='MotionLog',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('message_list', jsonfield.fields.JSONField()),
|
||||||
|
('time', models.DateTimeField(auto_now=True)),
|
||||||
|
('motion', models.ForeignKey(related_name='log_messages', to='motions.Motion')),
|
||||||
|
('person', models.ForeignKey(null=True, to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'ordering': ['-time'],
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='MotionOption',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='MotionPoll',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('votesvalid', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Valid votes')),
|
||||||
|
('votesinvalid', openslides.utils.models.MinMaxIntegerField(
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
verbose_name='Invalid votes')),
|
||||||
|
('votescast', openslides.utils.models.MinMaxIntegerField(null=True, blank=True, verbose_name='Votes cast')),
|
||||||
|
('poll_number', models.PositiveIntegerField(default=1)),
|
||||||
|
('motion', models.ForeignKey(related_name='polls', to='motions.Motion')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='MotionVersion',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('version_number', models.PositiveIntegerField(default=1)),
|
||||||
|
('title', models.CharField(max_length=255, verbose_name='Title')),
|
||||||
|
('text', models.TextField(verbose_name='Text')),
|
||||||
|
('reason', models.TextField(null=True, blank=True, verbose_name='Reason')),
|
||||||
|
('creation_time', models.DateTimeField(auto_now=True)),
|
||||||
|
('motion', models.ForeignKey(related_name='versions', to='motions.Motion')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='MotionVote',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('weight', models.IntegerField(null=True, default=1)),
|
||||||
|
('value', models.CharField(null=True, max_length=255)),
|
||||||
|
('option', models.ForeignKey(to='motions.MotionOption')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='State',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
('action_word', models.CharField(max_length=255)),
|
||||||
|
('icon', models.CharField(max_length=255)),
|
||||||
|
('required_permission_to_see', models.CharField(blank=True, max_length=255)),
|
||||||
|
('allow_support', models.BooleanField(default=False)),
|
||||||
|
('allow_create_poll', models.BooleanField(default=False)),
|
||||||
|
('allow_submitter_edit', models.BooleanField(default=False)),
|
||||||
|
('versioning', models.BooleanField(default=False)),
|
||||||
|
('leave_old_version_active', models.BooleanField(default=False)),
|
||||||
|
('dont_set_identifier', models.BooleanField(default=False)),
|
||||||
|
('next_states', models.ManyToManyField(to='motions.State')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Workflow',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
('first_state', models.OneToOneField(to='motions.State', null=True, related_name='+')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='state',
|
||||||
|
name='workflow',
|
||||||
|
field=models.ForeignKey(to='motions.Workflow'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='motionversion',
|
||||||
|
unique_together=set([('motion', 'version_number')]),
|
||||||
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='motionpoll',
|
||||||
|
unique_together=set([('motion', 'poll_number')]),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motionoption',
|
||||||
|
name='poll',
|
||||||
|
field=models.ForeignKey(to='motions.MotionPoll'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='active_version',
|
||||||
|
field=models.ForeignKey(
|
||||||
|
to='motions.MotionVersion',
|
||||||
|
on_delete=django.db.models.deletion.SET_NULL,
|
||||||
|
null=True,
|
||||||
|
related_name='active_version'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='attachments',
|
||||||
|
field=models.ManyToManyField(to='mediafiles.Mediafile'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='category',
|
||||||
|
field=models.ForeignKey(to='motions.Category', null=True, blank=True),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='parent',
|
||||||
|
field=models.ForeignKey(to='motions.Motion', null=True, blank=True, related_name='amendments'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='state',
|
||||||
|
field=models.ForeignKey(null=True, to='motions.State'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='submitters',
|
||||||
|
field=models.ManyToManyField(related_name='motion_submitters', to=settings.AUTH_USER_MODEL),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='supporters',
|
||||||
|
field=models.ManyToManyField(related_name='motion_supporters', to=settings.AUTH_USER_MODEL),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='tags',
|
||||||
|
field=models.ManyToManyField(to='core.Tag'),
|
||||||
|
preserve_default=True,
|
||||||
|
),
|
||||||
|
]
|
0
openslides/motions/migrations/__init__.py
Normal file
0
openslides/motions/migrations/__init__.py
Normal file
76
openslides/users/migrations/0001_initial.py
Normal file
76
openslides/users/migrations/0001_initial.py
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
import django.utils.timezone
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
import openslides.utils.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('auth', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='User',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
|
||||||
|
('password', models.CharField(max_length=128, verbose_name='password')),
|
||||||
|
('last_login', models.DateTimeField(default=django.utils.timezone.now, verbose_name='last login')),
|
||||||
|
('is_superuser', models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
verbose_name='superuser status',
|
||||||
|
help_text='Designates that this user has all permissions without explicitly assigning them.')),
|
||||||
|
('username', models.CharField(max_length=255, blank=True, verbose_name='Username', unique=True)),
|
||||||
|
('first_name', models.CharField(max_length=255, blank=True, verbose_name='First name')),
|
||||||
|
('last_name', models.CharField(max_length=255, blank=True, verbose_name='Last name')),
|
||||||
|
('structure_level', models.CharField(
|
||||||
|
default='',
|
||||||
|
max_length=255,
|
||||||
|
blank=True,
|
||||||
|
verbose_name='Structure level',
|
||||||
|
help_text='Will be shown after the name.')),
|
||||||
|
('title', models.CharField(
|
||||||
|
default='',
|
||||||
|
max_length=50,
|
||||||
|
blank=True,
|
||||||
|
verbose_name='Title',
|
||||||
|
help_text='Will be shown before the name.')),
|
||||||
|
('about_me', models.TextField(default='', blank=True, verbose_name='About me', help_text='Your profile text')),
|
||||||
|
('comment', models.TextField(default='', blank=True, verbose_name='Comment', help_text='Only for notes.')),
|
||||||
|
('default_password', models.CharField(default='', max_length=100, blank=True, verbose_name='Default password')),
|
||||||
|
('is_active', models.BooleanField(
|
||||||
|
default=True,
|
||||||
|
verbose_name='active',
|
||||||
|
help_text='Designates whether this user should be treated as '
|
||||||
|
'active. Unselect this instead of deleting accounts.')),
|
||||||
|
('is_present', models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
verbose_name='present',
|
||||||
|
help_text='Designates whether this user is in the room or not.')),
|
||||||
|
('groups', models.ManyToManyField(
|
||||||
|
blank=True,
|
||||||
|
verbose_name='groups',
|
||||||
|
related_query_name='user',
|
||||||
|
related_name='user_set',
|
||||||
|
to='auth.Group',
|
||||||
|
help_text='The groups this user belongs to. A user will get '
|
||||||
|
'all permissions granted to each of his/her group.')),
|
||||||
|
('user_permissions', models.ManyToManyField(
|
||||||
|
blank=True,
|
||||||
|
verbose_name='user permissions',
|
||||||
|
related_query_name='user',
|
||||||
|
related_name='user_set',
|
||||||
|
to='auth.Permission',
|
||||||
|
help_text='Specific permissions for this user.')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'permissions': (
|
||||||
|
('can_see_name', 'Can see names of users'),
|
||||||
|
('can_see_extra_data', 'Can see extra data of users'),
|
||||||
|
('can_manage', 'Can manage users')),
|
||||||
|
'ordering': ('last_name',),
|
||||||
|
},
|
||||||
|
bases=(openslides.utils.models.RESTModelMixin, models.Model),
|
||||||
|
),
|
||||||
|
]
|
0
openslides/users/migrations/__init__.py
Normal file
0
openslides/users/migrations/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user