Ignore and delete migrations

This commit is contained in:
Tanner Collin 2018-09-13 18:04:02 -06:00
parent 259af053f6
commit ac9aeb909a
6 changed files with 2 additions and 97 deletions

View File

@ -104,6 +104,7 @@ ENV/
# DB
db.sqlite3
migrations/
# media
media/*

View File

@ -4,7 +4,7 @@ Setup:
$ virtualenv -p python3 env
$ . env/bin/activate
(env) $ pip install -r requirements.txt
(env) $ python manage.py migrate
(env) $ python manage.py migrate --run-syncdb
(env) $ python manage.py createsuperuser --email admin@example.com --username admin
(env) $ python manage.py runserver
```

View File

@ -1,55 +0,0 @@
# Generated by Django 2.1.1 on 2018-09-12 21:41
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=32)),
('slug', models.CharField(max_length=32)),
('info', models.TextField(blank=True, max_length=1024)),
('photo', models.FileField(upload_to='media/')),
],
),
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('lockout_admin', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='Tool',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=32)),
('info', models.TextField(blank=True, max_length=1024)),
('wiki_id', models.IntegerField()),
('photo', models.FileField(upload_to='media/')),
('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tools', to='api.Category')),
],
),
migrations.AddField(
model_name='profile',
name='authorized_tools',
field=models.ManyToManyField(to='api.Tool'),
),
migrations.AddField(
model_name='profile',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 2.1.1 on 2018-09-12 21:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='category',
name='photo',
field=models.FileField(upload_to='static/media/'),
),
]

View File

@ -1,23 +0,0 @@
# Generated by Django 2.1.1 on 2018-09-12 23:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0002_auto_20180912_2156'),
]
operations = [
migrations.AlterField(
model_name='category',
name='photo',
field=models.ImageField(upload_to=''),
),
migrations.AlterField(
model_name='tool',
name='photo',
field=models.ImageField(upload_to=''),
),
]