Skip to content

Commit

Permalink
[-] Add migrations for simpletext example app
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Oct 13, 2017
1 parent 9a71474 commit 408e69d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions example/simpletext/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-10-12 20:27
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import mptt.fields


class Migration(migrations.Migration):

initial = True

dependencies = []

operations = [
migrations.CreateModel(
name='SimpleCategory',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100, verbose_name='name')),
('slug', models.SlugField(verbose_name='slug')),
('active', models.BooleanField(default=True, verbose_name='active')),
('lft', models.PositiveIntegerField(db_index=True, editable=False)),
('rght', models.PositiveIntegerField(db_index=True, editable=False)),
('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
('level', models.PositiveIntegerField(db_index=True, editable=False)),
('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='simpletext.SimpleCategory', verbose_name='parent')),
],
options={
'verbose_name_plural': 'simple categories',
},
),
migrations.CreateModel(
name='SimpleText',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('description', models.TextField(blank=True)),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
],
options={
'ordering': ('-created',),
'get_latest_by': 'updated',
'verbose_name_plural': 'Simple Text',
},
),
]
Empty file.

0 comments on commit 408e69d

Please sign in to comment.