ScooterMcTooter / MoneyTracker

This is an application designed to visualize where your money is going and how much you are bringing in. The goal is to give the ability to plan for the future effectively by being able to immediately see the changes to the plan
1 stars 0 forks source link

#16 Create categories reference table #29

Closed ScooterMcTooter closed 6 months ago

ScooterMcTooter commented 6 months ago

The most significant changes involve the database schema and the models used in the application. The ApplicationDbContext class has been replaced with MoneyTrackerMigrations.ApplicationDbContext, indicating a change in the database context. A new DbSet for TransactionTypeModel has been added, suggesting a new table for transaction types in the database. The TransactionType property in the Transactions table has been renamed to TransactionTypeId and a new table TransactionTypes has been added. The model classes AutoPayModel and TransactionModel have been updated to reflect these changes. A new model class TransactionTypeModel has been added to represent the TransactionTypes table in the database.

Changes:

  1. ApplicationDbContext class in MauiProgram.cs replaced with MoneyTrackerMigrations.ApplicationDbContext in App.xaml.cs.
  2. SettingsViewModel parameter in AppShell constructor in AppShell.xaml.cs changed from vm to settingsViewModel.
  3. MoneyTrackerMigrations namespace added to several files (CreateUserViewModel.cs, LoginViewModel.cs, UserViewModel.cs, ApplicationDbContext.cs).
  4. New DbSet for TransactionTypeModel added in ApplicationDbContext.cs. Connection string for the database changed to use a constant string from Constants.cs.
  5. New method SetConnectionString added in Constants.cs to set the connection string for the database based on the application mode.
  6. TransactionType property in Transactions table renamed to TransactionTypeId and new table TransactionTypes added in ApplicationDbContextModelSnapshot.cs.
  7. TransactionType property replaced with TransactionTypeId and TransactionType in AutoPayModel.cs and TransactionModel.cs.
  8. New migration file 20240517175044_AddTransactionTypeReferenceTable.cs added, containing changes to the database schema.
  9. New migration file 20240517175044_AddTransactionTypeReferenceTable.Designer.cs added, auto-generated to create or update the database schema.
  10. New model class TransactionTypeModel added in TransactionTypeModel.cs, representing the TransactionTypes table in the database.