Skip to content

Commit

Permalink
Revert back the initial migration and add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ba11b0y committed Oct 24, 2018
1 parent 36d90a9 commit 736302d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
10 changes: 10 additions & 0 deletions readthedocs/builds/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ class Migration(migrations.Migration):
'permissions': (('view_version', 'View Version'),),
},
),
migrations.CreateModel(
name='VersionAlias',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('from_slug', models.CharField(default=b'', max_length=255, verbose_name='From slug')),
('to_slug', models.CharField(default=b'', max_length=255, verbose_name='To slug', blank=True)),
('largest', models.BooleanField(default=False, verbose_name='Largest')),
('project', models.ForeignKey(related_name='aliases', verbose_name='Project', to='projects.Project')),
],
),
migrations.AddField(
model_name='build',
name='version',
Expand Down
58 changes: 58 additions & 0 deletions readthedocs/builds/migrations/0005_remove-version-alias.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-10-17 04:20
from __future__ import unicode_literals

from django.db import migrations, models
import readthedocs.builds.version_slug


class Migration(migrations.Migration):

dependencies = [
('builds', '0004_add-apiversion-proxy-model'),
]

operations = [
migrations.RemoveField(
model_name='versionalias',
name='project',
),
migrations.AlterField(
model_name='build',
name='error',
field=models.TextField(blank=True, default='', verbose_name='Error'),
),
migrations.AlterField(
model_name='build',
name='output',
field=models.TextField(blank=True, default='', verbose_name='Output'),
),
migrations.AlterField(
model_name='build',
name='state',
field=models.CharField(choices=[('triggered', 'Triggered'), ('cloning', 'Cloning'), ('installing', 'Installing'), ('building', 'Building'), ('finished', 'Finished')], default='finished', max_length=55, verbose_name='State'),
),
migrations.AlterField(
model_name='build',
name='type',
field=models.CharField(choices=[('html', 'HTML'), ('pdf', 'PDF'), ('epub', 'Epub'), ('man', 'Manpage'), ('dash', 'Dash')], default='html', max_length=55, verbose_name='Type'),
),
migrations.AlterField(
model_name='version',
name='privacy_level',
field=models.CharField(choices=[('public', 'Public'), ('protected', 'Protected'), ('private', 'Private')], default='public', help_text='Level of privacy for this Version.', max_length=20, verbose_name='Privacy Level'),
),
migrations.AlterField(
model_name='version',
name='slug',
field=readthedocs.builds.version_slug.VersionSlugField(db_index=True, max_length=255, populate_from='verbose_name', verbose_name='Slug'),
),
migrations.AlterField(
model_name='version',
name='type',
field=models.CharField(choices=[('branch', 'Branch'), ('tag', 'Tag'), ('unknown', 'Unknown')], default='unknown', max_length=20, verbose_name='Type'),
),
migrations.DeleteModel(
name='VersionAlias',
),
]

0 comments on commit 736302d

Please sign in to comment.