Skip to content

Commit

Permalink
Flatten Migrations (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruuushhh authored Feb 6, 2024
1 parent 8e356d8 commit acf3e79
Show file tree
Hide file tree
Showing 20 changed files with 55 additions and 407 deletions.
4 changes: 2 additions & 2 deletions apps/accounting_exports/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.1.2 on 2024-01-09 03:44
# Generated by Django 4.1.2 on 2024-02-06 09:40

import django.contrib.postgres.fields
from django.db import migrations, models
Expand All @@ -11,9 +11,9 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('fyle_accounting_mappings', '0024_auto_20230922_0819'),
('workspaces', '0002_alter_workspace_ms_business_central_accounts_last_synced_at_and_more'),
('fyle', '0001_initial'),
('fyle_accounting_mappings', '0024_auto_20230922_0819'),
]

operations = [
Expand Down
44 changes: 42 additions & 2 deletions apps/business_central/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.1.2 on 2024-01-09 03:44
# Generated by Django 4.1.2 on 2024-02-06 09:40

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -10,9 +10,9 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('workspaces', '0002_alter_workspace_ms_business_central_accounts_last_synced_at_and_more'),
('accounting_exports', '0001_initial'),
('fyle', '0001_initial'),
('workspaces', '0002_alter_workspace_ms_business_central_accounts_last_synced_at_and_more'),
]

operations = [
Expand All @@ -23,6 +23,8 @@ class Migration(migrations.Migration):
('created_at', models.DateTimeField(auto_now_add=True, help_text='Created at')),
('updated_at', models.DateTimeField(auto_now=True, help_text='Updated at')),
('accounts_payable_account_id', ms_business_central_api.models.fields.StringNullField(help_text='destination id of accounts payable account', max_length=255, null=True)),
('account_id', ms_business_central_api.models.fields.StringNullField(help_text='destination id of employee account', max_length=255, null=True)),
('account_type', ms_business_central_api.models.fields.StringNullField(help_text='destination id of employee account', max_length=255, null=True)),
('amount', ms_business_central_api.models.fields.FloatNullField(help_text='Amount of the invoice', null=True)),
('comment', ms_business_central_api.models.fields.TextNotNullField(help_text='description for the invoice')),
('description', ms_business_central_api.models.fields.TextNullField(help_text='description for the invoice', null=True)),
Expand All @@ -35,13 +37,51 @@ class Migration(migrations.Migration):
'db_table': 'journal_entries',
},
),
migrations.CreateModel(
name='PurchaseInvoice',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, help_text='Created at')),
('updated_at', models.DateTimeField(auto_now=True, help_text='Updated at')),
('accounting_date', ms_business_central_api.models.fields.CustomDateTimeField(help_text='accounting date of purchase invoice', null=True)),
('amount', ms_business_central_api.models.fields.FloatNullField(help_text='Total Amount of the invoice', null=True)),
('code', ms_business_central_api.models.fields.StringNullField(help_text='unique code for invoice', max_length=10, null=True)),
('invoice_date', ms_business_central_api.models.fields.CustomDateTimeField(help_text='date of invoice', null=True)),
('vendor_number', ms_business_central_api.models.fields.StringNullField(help_text='id of vendor', max_length=255, null=True)),
('accounting_export', models.OneToOneField(help_text='Accounting Export reference', on_delete=django.db.models.deletion.PROTECT, related_name='purchase_invoice', to='accounting_exports.accountingexport')),
('workspace', models.ForeignKey(help_text='Reference to Workspace model', on_delete=django.db.models.deletion.PROTECT, to='workspaces.workspace')),
],
options={
'db_table': 'purchase_invoices',
},
),
migrations.CreateModel(
name='PurchaseInvoiceLineitems',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, help_text='Created at')),
('updated_at', models.DateTimeField(auto_now=True, help_text='Updated at')),
('accounts_payable_account_id', ms_business_central_api.models.fields.StringNullField(help_text='destination id of accounts payable account', max_length=255, null=True)),
('amount', ms_business_central_api.models.fields.FloatNullField(help_text='Amount of the invoice', null=True)),
('description', ms_business_central_api.models.fields.TextNotNullField(help_text='description for the invoice')),
('location_id', ms_business_central_api.models.fields.StringNullField(help_text='location id of the invoice', max_length=255, null=True)),
('expense', models.OneToOneField(help_text='Reference to Expense', on_delete=django.db.models.deletion.PROTECT, to='fyle.expense')),
('purchase_invoice', models.ForeignKey(help_text='Reference to PurchaseInvoice', on_delete=django.db.models.deletion.PROTECT, to='business_central.purchaseinvoice')),
('workspace', models.ForeignKey(help_text='Reference to Workspace model', on_delete=django.db.models.deletion.PROTECT, to='workspaces.workspace')),
],
options={
'db_table': 'purchase_invoice_lineitems',
},
),
migrations.CreateModel(
name='JournalEntryLineItems',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True, help_text='Created at')),
('updated_at', models.DateTimeField(auto_now=True, help_text='Updated at')),
('accounts_payable_account_id', ms_business_central_api.models.fields.StringNullField(help_text='destination id of accounts payable account', max_length=255, null=True)),
('account_id', ms_business_central_api.models.fields.StringNullField(help_text='destination id of employee account', max_length=255, null=True)),
('account_type', ms_business_central_api.models.fields.StringNullField(help_text='destination id of employee account', max_length=255, null=True)),
('amount', ms_business_central_api.models.fields.FloatNullField(help_text='Amount of the invoice', null=True)),
('comment', ms_business_central_api.models.fields.TextNotNullField(help_text='description for the invoice')),
('description', ms_business_central_api.models.fields.TextNullField(help_text='description for the invoice', null=True)),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion apps/fyle/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.1.2 on 2024-01-09 03:44
# Generated by Django 4.1.2 on 2024-02-06 09:40

import django.contrib.postgres.fields
import django.core.validators
Expand Down
2 changes: 1 addition & 1 deletion apps/mappings/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 4.1.2 on 2024-01-09 03:44
# Generated by Django 4.1.2 on 2024-02-06 09:40

from django.db import migrations, models
import django.db.models.deletion
Expand Down
Loading

0 comments on commit acf3e79

Please sign in to comment.