Skip to content

Commit

Permalink
Add new model
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobichaud committed Jan 15, 2018
1 parent c70ecf9 commit 38fac90
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testing_migrations/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ class AwesomeModelFactory(factory.DjangoModelFactory):

class Meta:
model = models.AwesomeModel


class KittenFactory(factory.DjangoModelFactory):
name = factory.Faker('pystr')

class Meta:
model = models.Kitten

22 changes: 22 additions & 0 deletions testing_migrations/migrations/0003_kitten.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-01-15 00:13
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('testing_migrations', '0002_awesome_model_unique_name'),
]

operations = [
migrations.CreateModel(
name='Kitten',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
],
),
]
5 changes: 5 additions & 0 deletions testing_migrations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@

class AwesomeModel(models.Model):
name = models.CharField(max_length=100, unique=True)


class Kitten(models.Model):
name = models.CharField(max_length=100)

0 comments on commit 38fac90

Please sign in to comment.