From ec1043d50c9b0731a221c35d0a92a7629324003a Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 12 Nov 2022 12:00:44 -0600 Subject: bdgt: switched to seperate model for spending cat --- .../0005_luxspendingcategory_luxfixedmonthly.py | 33 ++++++++++++++++++++++ .../0006_remove_luxfixedmonthly_cat_and_more.py | 23 +++++++++++++++ app/budget/migrations/0007_luxpurchase_cat.py | 19 +++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py create mode 100644 app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py create mode 100644 app/budget/migrations/0007_luxpurchase_cat.py (limited to 'app/budget/migrations') diff --git a/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py b/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py new file mode 100644 index 0000000..66af470 --- /dev/null +++ b/app/budget/migrations/0005_luxspendingcategory_luxfixedmonthly.py @@ -0,0 +1,33 @@ +# Generated by Django 4.0.6 on 2022-11-12 12:52 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0004_alter_luxpurchase_source'), + ] + + operations = [ + migrations.CreateModel( + name='LuxSpendingCategory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('date_recorded', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='LuxFixedMonthly', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('category', models.IntegerField(choices=[(0, 'Grocery & Home'), (1, 'Gas'), (2, 'Bus'), (3, 'Lodging'), (4, 'Books'), (5, 'Clothes'), (6, 'Eating Out'), (7, 'Misc')], default=0)), + ('date_recorded', models.DateTimeField(auto_now_add=True)), + ('cat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory')), + ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxsource')), + ], + ), + ] diff --git a/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py b/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py new file mode 100644 index 0000000..3631cc3 --- /dev/null +++ b/app/budget/migrations/0006_remove_luxfixedmonthly_cat_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.0.6 on 2022-11-12 12:53 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0005_luxspendingcategory_luxfixedmonthly'), + ] + + operations = [ + migrations.RemoveField( + model_name='luxfixedmonthly', + name='cat', + ), + migrations.AlterField( + model_name='luxfixedmonthly', + name='category', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), + ), + ] diff --git a/app/budget/migrations/0007_luxpurchase_cat.py b/app/budget/migrations/0007_luxpurchase_cat.py new file mode 100644 index 0000000..7a8e548 --- /dev/null +++ b/app/budget/migrations/0007_luxpurchase_cat.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.6 on 2022-11-12 12:56 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('budget', '0006_remove_luxfixedmonthly_cat_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='luxpurchase', + name='cat', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='budget.luxspendingcategory'), + ), + ] -- cgit v1.2.3-70-g09d2