Commit 47301d0d authored by Claude Paroz's avatar Claude Paroz

Added database migrations for Django >= 1.7

parent 1d9cc4aa
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('teams', '__first__'),
]
operations = [
migrations.CreateModel(
name='Language',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(unique=True, max_length=50)),
('locale', models.CharField(unique=True, max_length=15)),
('plurals', models.CharField(max_length=200, blank=True)),
('team', models.ForeignKey(default=None, blank=True, to='teams.Team', null=True)),
],
options={
'ordering': ('name',),
'db_table': 'language',
},
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.contrib.auth.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
]
operations = [
migrations.CreateModel(
name='Person',
fields=[
('user_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
('svn_account', models.SlugField(max_length=20, null=True, blank=True)),
('image', models.URLField(help_text='URL to an image file (.jpg, .png, ...) of an hackergotchi (max. 100x100 pixels)', null=True, verbose_name='Image', blank=True)),
('use_gravatar', models.BooleanField(default=False, help_text='Display the image of your gravatar.com account')),
('webpage_url', models.URLField(null=True, verbose_name='Web page', blank=True)),
('irc_nick', models.SlugField(max_length=20, null=True, verbose_name='IRC nickname', blank=True)),
('bugzilla_account', models.EmailField(help_text="This should be an email address, useful if not equal to 'E-mail address' field", max_length=254, null=True, verbose_name='Bugzilla account', blank=True)),
('activation_key', models.CharField(max_length=40, null=True, blank=True)),
],
options={
'ordering': ('username',),
'db_table': 'person',
},
bases=('auth.user',),
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
import common.fields
class Migration(migrations.Migration):
dependencies = [
('people', '0001_initial'),
('languages', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Branch',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=50)),
('vcs_subpath', models.CharField(max_length=50, null=True, blank=True)),
('weight', models.IntegerField(default=0, help_text='Smaller weight is displayed first')),
('file_hashes', common.fields.DictionaryField(default='', editable=False, blank=True)),
],
options={
'ordering': ('name',),
'db_table': 'branch',
'verbose_name_plural': 'branches',
},
),
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(default='default', max_length=30, choices=[('default', 'Default'), ('admin-tools', 'Administration Tools'), ('dev-tools', 'Development Tools'), ('desktop', 'GNOME Desktop'), ('dev-platform', 'GNOME Developer Platform'), ('proposed', 'New Module Proposals'), ('g3-core', 'Core'), ('g3-utils', 'Utils'), ('g3-apps', 'Apps'), ('g3-a11y', 'Accessibility'), ('g3-games', 'Games'), ('g3-backends', 'Backends'), ('g3-dev-tools', 'Development Tools'), ('g3-core-libs', 'Core Libraries'), ('g3-extra-libs', 'Extra Libraries'), ('g2-legacy', 'Legacy Desktop'), ('stable', 'Stable Branches'), ('dev', 'Development Branches')])),
('branch', models.ForeignKey(to='stats.Branch')),
],
options={
'db_table': 'category',
'verbose_name_plural': 'categories',
},
),
migrations.CreateModel(
name='Domain',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=50)),
('description', models.TextField(null=True, blank=True)),
('dtype', models.CharField(default='ui', max_length=5, choices=[('ui', 'User Interface'), ('doc', 'Documentation')])),
('directory', models.CharField(max_length=50)),
('pot_method', models.CharField(help_text='Leave blank for standard method (intltool for UI and gnome-doc-utils for DOC)', max_length=100, null=True, blank=True)),
('linguas_location', models.CharField(help_text=b"Use 'no' for no LINGUAS check, or path/to/file#variable for a non-standard location.\n Leave blank for standard location (ALL_LINGUAS in LINGUAS/configure.ac/.in for UI and DOC_LINGUAS in Makefile.am for DOC)", max_length=50, null=True, blank=True)),
('red_filter', models.TextField(help_text='pogrep filter to strip po file from unprioritized strings (format: location|string, "-" for no filter)', null=True, blank=True)),
],
options={
'ordering': ('-dtype', 'name'),
'db_table': 'domain',
},
),
migrations.CreateModel(
name='Information',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('type', models.CharField(max_length=10, choices=[('info', 'Information'), ('warn', 'Warning'), ('error', 'Error'), ('warn-ext', 'Warning (external)'), ('error-ext', 'Error (external)')])),
('description', models.TextField()),
],
options={
'db_table': 'information',
},
),
migrations.CreateModel(
name='InformationArchived',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('type', models.CharField(max_length=10, choices=[('info', 'Information'), ('warn', 'Warning'), ('error', 'Error'), ('warn-ext', 'Warning (external)'), ('error-ext', 'Error (external)')])),
('description', models.TextField()),
],
options={
'db_table': 'information_archived',
},
),
migrations.CreateModel(
name='Module',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.SlugField(unique=True)),
('homepage', models.URLField(help_text='Automatically updated if the module contains a doap file.', null=True, blank=True)),
('description', models.TextField(null=True, blank=True)),
('comment', models.TextField(null=True, blank=True)),
('bugs_base', models.CharField(max_length=50, null=True, blank=True)),
('bugs_product', models.CharField(max_length=50, null=True, blank=True)),
('bugs_component', models.CharField(max_length=50, null=True, blank=True)),
('vcs_type', models.CharField(max_length=5, choices=[('cvs', 'CVS'), ('svn', 'Subversion'), ('git', 'Git'), ('hg', 'Mercurial'), ('bzr', 'Bazaar')])),
('vcs_root', models.CharField(max_length=200)),
('vcs_web', models.URLField()),
('ext_platform', models.URLField(help_text='URL to external translation platform, if any', null=True, blank=True)),
('archived', models.BooleanField(default=False)),
('maintainers', models.ManyToManyField(help_text='Automatically updated if the module contains a doap file.', related_name='maintains_modules', db_table='module_maintainer', to='people.Person', blank=True)),
],
options={
'ordering': ('name',),
'db_table': 'module',
},
),
migrations.CreateModel(
name='PoFile',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('path', models.CharField(max_length=255, null=True, blank=True)),
('updated', models.DateTimeField(auto_now_add=True)),
('translated', models.IntegerField(default=0)),
('fuzzy', models.IntegerField(default=0)),
('untranslated', models.IntegerField(default=0)),
('figures', common.fields.JSONField(null=True, blank=True)),
('translated_words', models.IntegerField(default=0)),
('fuzzy_words', models.IntegerField(default=0)),
('untranslated_words', models.IntegerField(default=0)),
],
options={
'db_table': 'pofile',
},
),
migrations.CreateModel(
name='Release',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.SlugField(max_length=20)),
('description', models.CharField(max_length=50)),
('string_frozen', models.BooleanField(default=False)),
('status', models.CharField(max_length=12, choices=[('official', 'Official'), ('unofficial', 'Unofficial'), ('xternal', 'External')])),
('weight', models.IntegerField(default=0)),
('branches', models.ManyToManyField(related_name='releases', through='stats.Category', to='stats.Branch')),
],
options={
'ordering': ('status', '-name'),
'db_table': 'release',
},
),
migrations.CreateModel(
name='Statistics',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('branch', models.ForeignKey(to='stats.Branch')),
('domain', models.ForeignKey(to='stats.Domain')),
('full_po', models.OneToOneField(related_name='stat_f', null=True, on_delete=django.db.models.deletion.SET_NULL, to='stats.PoFile')),
('language', models.ForeignKey(to='languages.Language', null=True)),
('part_po', models.OneToOneField(related_name='stat_p', null=True, on_delete=django.db.models.deletion.SET_NULL, to='stats.PoFile')),
],
options={
'db_table': 'statistics',
'verbose_name': 'statistics',
'verbose_name_plural': 'statistics',
},
),
migrations.CreateModel(
name='StatisticsArchived',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('module', models.TextField()),
('type', models.CharField(max_length=3, choices=[('ui', 'User Interface'), ('doc', 'Documentation')])),
('domain', models.TextField()),
('branch', models.TextField()),
('language', models.CharField(max_length=15)),
('date', models.DateTimeField()),
('translated', models.IntegerField(default=0)),
('fuzzy', models.IntegerField(default=0)),
('untranslated', models.IntegerField(default=0)),
],
options={
'db_table': 'statistics_archived',
},
),
migrations.AddField(
model_name='informationarchived',
name='statistics',
field=models.ForeignKey(to='stats.StatisticsArchived'),
),
migrations.AddField(
model_name='information',
name='statistics',
field=models.ForeignKey(to='stats.Statistics'),
),
migrations.AddField(
model_name='domain',
name='module',
field=models.ForeignKey(to='stats.Module'),
),
migrations.AddField(
model_name='category',
name='release',
field=models.ForeignKey(to='stats.Release'),
),
migrations.AddField(
model_name='branch',
name='module',
field=models.ForeignKey(to='stats.Module'),
),
migrations.AlterUniqueTogether(
name='statistics',
unique_together=set([('branch', 'domain', 'language')]),
),
migrations.AlterUniqueTogether(
name='category',
unique_together=set([('release', 'branch')]),
),
migrations.AlterUniqueTogether(
name='branch',
unique_together=set([('name', 'module')]),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('people', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Role',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('role', models.CharField(default='translator', max_length=15, choices=[('translator', 'Translator'), ('reviewer', 'Reviewer'), ('committer', 'Committer'), ('coordinator', 'Coordinator')])),
('is_active', models.BooleanField(default=True)),
('person', models.ForeignKey(to='people.Person')),
],
options={
'db_table': 'role',
},
),
migrations.CreateModel(
name='Team',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=80)),
('description', models.TextField()),
('use_workflow', models.BooleanField(default=True)),
('presentation', models.TextField(verbose_name='Presentation', blank=True)),
('webpage_url', models.URLField(null=True, verbose_name='Web page', blank=True)),
('mailing_list', models.EmailField(max_length=254, null=True, verbose_name='Mailing list', blank=True)),
('mailing_list_subscribe', models.URLField(null=True, verbose_name='URL to subscribe', blank=True)),
('members', models.ManyToManyField(related_name='teams', through='teams.Role', to='people.Person')),
],
options={
'ordering': ('description',),
'db_table': 'team',
},
),
migrations.AddField(
model_name='role',
name='team',
field=models.ForeignKey(to='teams.Team'),
),
migrations.AlterUniqueTogether(
name='role',
unique_together=set([('team', 'person')]),
),
]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import vertimus.models
class Migration(migrations.Migration):
dependencies = [
('stats', '__first__'),
('people', '__first__'),
('languages', '__first__'),
]
operations = [
migrations.CreateModel(
name='Action',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.SlugField(max_length=8)),
('created', models.DateTimeField(editable=False)),
('comment', models.TextField(null=True, blank=True)),
('file', models.FileField(null=True, upload_to=vertimus.models.generate_upload_filename, blank=True)),
('merged_file', models.OneToOneField(null=True, blank=True, to='stats.PoFile')),
('person', models.ForeignKey(to='people.Person')),
],
options={
'db_table': 'action',
'verbose_name': 'action',
},
),
migrations.CreateModel(
name='ActionArchived',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.SlugField(max_length=8)),
('created', models.DateTimeField(editable=False)),
('comment', models.TextField(null=True, blank=True)),
('file', models.FileField(null=True, upload_to=vertimus.models.generate_upload_filename, blank=True)),
('sequence', models.IntegerField(null=True)),
('merged_file', models.OneToOneField(null=True, blank=True, to='stats.PoFile')),
('person', models.ForeignKey(to='people.Person')),
],
options={
'db_table': 'action_archived',
},
),
migrations.CreateModel(
name='State',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.SlugField(default='None', max_length=20)),
('updated', models.DateTimeField(auto_now=True)),
('branch', models.ForeignKey(to='stats.Branch')),
('domain', models.ForeignKey(to='stats.Domain')),
('language', models.ForeignKey(to='languages.Language')),
('person', models.ForeignKey(default=None, to='people.Person', null=True)),
],
options={
'db_table': 'state',
'verbose_name': 'state',
},
),
migrations.AddField(
model_name='actionarchived',
name='state_db',
field=models.ForeignKey(to='vertimus.State'),
),
migrations.AddField(
model_name='action',
name='state_db',
field=models.ForeignKey(to='vertimus.State'),
),
migrations.CreateModel(
name='ActionAA',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionCI',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionIC',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionRC',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionRP',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionRT',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionTC',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionTR',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionUNDO',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionUP',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionUT',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='ActionWC',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.action',),
),
migrations.CreateModel(
name='StateCommitted',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateCommitting',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateNone',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateProofread',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateProofreading',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateToCommit',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateToReview',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateTranslated',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.CreateModel(
name='StateTranslating',
fields=[
],
options={
'proxy': True,
},
bases=('vertimus.state',),
),
migrations.AlterUniqueTogether(
name='state',
unique_together=set([('branch', 'domain', 'language')]),
),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment