-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[-] Add migrations for simpletext example app
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.