recreated migrations for new DB structure
This commit is contained in:
parent
f89295e000
commit
502383771f
33
connection/migrations/0001_initial.py
Normal file
33
connection/migrations/0001_initial.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# Generated by Django 3.0.5 on 2020-06-04 00:40
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import jsonfield.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ConnectionType',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
('filename', models.CharField(max_length=255, unique=True)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Connection',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
('credentials', jsonfield.fields.JSONField(default=dict)),
|
||||||
|
('type', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='connection.ConnectionType')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
0
connection/migrations/__init__.py
Normal file
0
connection/migrations/__init__.py
Normal file
102
qrtr_account/migrations/0001_initial.py
Normal file
102
qrtr_account/migrations/0001_initial.py
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# Generated by Django 3.0.5 on 2020-06-04 00:39
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import jsonfield.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
|
('connection', '__first__'),
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Account',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=250)),
|
||||||
|
('admin_users', models.ManyToManyField(blank=True, related_name='admin_accounts', to=settings.AUTH_USER_MODEL)),
|
||||||
|
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='owned_accounts', to=settings.AUTH_USER_MODEL)),
|
||||||
|
('view_users', models.ManyToManyField(blank=True, related_name='view_accounts', to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Bank',
|
||||||
|
fields=[
|
||||||
|
('acc_id', models.CharField(max_length=250, primary_key=True, serialize=False)),
|
||||||
|
('nickname', models.CharField(max_length=250)),
|
||||||
|
('official_name', models.CharField(blank=True, max_length=250, null=True)),
|
||||||
|
('balance_limit', models.DecimalField(blank=True, decimal_places=3, max_digits=100, null=True)),
|
||||||
|
('balance', models.DecimalField(decimal_places=3, max_digits=100)),
|
||||||
|
('ac_type', models.CharField(blank=True, max_length=250)),
|
||||||
|
('ac_subtype', models.CharField(blank=True, max_length=250)),
|
||||||
|
('mask', models.CharField(blank=True, max_length=4)),
|
||||||
|
('connection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='connection.Connection')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Institution',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Schedule',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Slice',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=250)),
|
||||||
|
('icon', models.CharField(max_length=250)),
|
||||||
|
('budget', models.DecimalField(decimal_places=3, max_digits=100)),
|
||||||
|
('parent_id', models.PositiveIntegerField()),
|
||||||
|
('is_unsliced', models.BooleanField(default=False)),
|
||||||
|
('parent_type', models.ForeignKey(limit_choices_to=models.Q(models.Q(('app_label', 'qrtr_account'), ('model', 'bank')), models.Q(('app_label', 'qrtr_account'), ('model', 'slice')), _connector='OR'), on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Transaction',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('datetime', models.DateTimeField()),
|
||||||
|
('details', jsonfield.fields.JSONField(default=dict)),
|
||||||
|
('Bank', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transactions', to='qrtr_account.Bank')),
|
||||||
|
('Slice', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='qrtr_account.Slice')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Rule',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('kind', models.CharField(choices=[('refill', 'Refill'), ('increase', 'Increase'), ('goal', 'Goal')], max_length=255)),
|
||||||
|
('amount_type', models.CharField(choices=[('quantity', 'Quantity'), ('round', 'Round'), ('percent', 'Percent')], default='quantity', max_length=20)),
|
||||||
|
('amount', models.DecimalField(decimal_places=3, max_digits=100)),
|
||||||
|
('destination', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rule_destination_set', to='qrtr_account.Slice')),
|
||||||
|
('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rule_source_set', to='qrtr_account.Slice')),
|
||||||
|
('when_to_run', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='qrtr_account.Schedule')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='bank',
|
||||||
|
name='institution',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='banks', to='qrtr_account.Institution'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='bank',
|
||||||
|
name='qrtr_account',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='qrtr_account.Account'),
|
||||||
|
),
|
||||||
|
]
|
||||||
0
qrtr_account/migrations/__init__.py
Normal file
0
qrtr_account/migrations/__init__.py
Normal file
45
user/migrations/0001_initial.py
Normal file
45
user/migrations/0001_initial.py
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Generated by Django 3.0.5 on 2020-06-04 00:31
|
||||||
|
|
||||||
|
import django.contrib.auth.models
|
||||||
|
import django.contrib.auth.validators
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.utils.timezone
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('auth', '0011_update_proxy_permissions'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='User',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('password', models.CharField(max_length=128, verbose_name='password')),
|
||||||
|
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
||||||
|
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
|
||||||
|
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
|
||||||
|
('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
|
||||||
|
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
|
||||||
|
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
|
||||||
|
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
|
||||||
|
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
|
||||||
|
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
|
||||||
|
('name', models.CharField(blank=True, max_length=255)),
|
||||||
|
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
|
||||||
|
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'user',
|
||||||
|
'verbose_name_plural': 'users',
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
managers=[
|
||||||
|
('objects', django.contrib.auth.models.UserManager()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
0
user/migrations/__init__.py
Normal file
0
user/migrations/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user