Ignore and delete migrations
This commit is contained in:
parent
259af053f6
commit
ac9aeb909a
1
authserver/.gitignore
vendored
1
authserver/.gitignore
vendored
|
@ -104,6 +104,7 @@ ENV/
|
||||||
|
|
||||||
# DB
|
# DB
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
|
migrations/
|
||||||
|
|
||||||
# media
|
# media
|
||||||
media/*
|
media/*
|
||||||
|
|
|
@ -4,7 +4,7 @@ Setup:
|
||||||
$ virtualenv -p python3 env
|
$ virtualenv -p python3 env
|
||||||
$ . env/bin/activate
|
$ . env/bin/activate
|
||||||
(env) $ pip install -r requirements.txt
|
(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 createsuperuser --email admin@example.com --username admin
|
||||||
(env) $ python manage.py runserver
|
(env) $ python manage.py runserver
|
||||||
```
|
```
|
||||||
|
|
|
@ -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),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -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/'),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -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=''),
|
|
||||||
),
|
|
||||||
]
|
|
Loading…
Reference in New Issue
Block a user