Updated migrations to allow for a model with a non autofield as the primary key.
Updated tests.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 2.0 on 2018-03-20 01:17
|
||||
|
||||
from django.db import migrations, models
|
||||
import uuid
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('samples', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='TestNonAutoFieldModel',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('order', models.PositiveIntegerField(db_index=True, editable=False)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['order'],
|
||||
},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='category',
|
||||
name='order',
|
||||
field=models.PositiveIntegerField(default=0, editable=False),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user