Ednormous / CITS3403-Group-Project

This is where the group project begins.
2 stars 0 forks source link

addition of a 'migration' folder to manage updates and changes the database #11

Closed Lucca-Sidey closed 6 months ago

Lucca-Sidey commented 6 months ago

In this commit......

wdATuwa commented 6 months ago

If I have this correct, a table is created when a user creates an account? Is there anything in there to prevent this happening for admin sign up as a timetable is not required? Not fully across alembic.

Lucca-Sidey commented 6 months ago

I am unsure at the moment as i can only login as admin. Something that we need to check.

My understanding is that the migration file allows us to manage our databases effectively while also storing versions at each change point in the case that it doesn't work. My intention is not to create a new table every time a new user is added, but to just add the 'Messages' table once and then ensure that that table is in relation to the 'User' table and stores all messages related to that user

The 3 bash lines in the previous comment automatically created the migration folder with all of the files in it in once swoop. I first added the class 'Message' to the models.py a did the initial migration. I needed to go back and change the Messages to allow for threading and users to comment multiple times on a thread, which i then did a second migrated and upgraded.(version not yet pushed). Seems to work on my end.

I could be widely misinformed so please feel free to educate and ill change accordingly

wdATuwa commented 6 months ago

Okay, thank you for the clarification!