Creating new Variables in the Database
As mentioned in my proposal[1] I will create new variables and modify the schema of how we save things in the database. Here I am facing issues (most probably because I am a newbie in SQL Alchemy). I am not able to understand how to exactly implement this. Relevant searches in the docs provided nothing substantial ( If there is then provide the appropriate link in the reply )
If there is not then GSoD guys take note, we can have a doc page on how to modify database if the admin wants to according to its needs( although it is highly rare for someone to do that so not that much priority upon this ).
On Wed, May 15, 2019, at 1:30 PM, Aaryan Bhagat wrote:
As mentioned in my proposal1 I will create new variables and modify the schema of how we save things in the database.
You probably mean attributes and not variables. Also, when using SQLAlchemy, you don't modify the database schema directly, but you change the Model and then generate a migration which would change database schema on next upgrade.
Here I am facing issues (most probably because I am a newbie in SQL Alchemy). I am not able to understand how to exactly implement this. Relevant searches in the docs provided nothing substantial ( If there is then provide the appropriate link in the reply )
This is basic use on how fields look like in SQLAlchemy1. After you have added a field, you can use Alembic to autogenerate migrations for your changes in database schema. See 2 on how to write alembic migration from scratch.
You can (and should) just use alembic to autogenerate it using the command mentioned here3.
If there is not then GSoD guys take note, we can have a doc page on how
It would be great if you used gender neutral pronouns4. Folks, People etc.
to modify database if the admin wants to according to its needs( although it is highly rare for someone to do that so not that much priority upon this ).
"Admin" is used for operators of a project, this is not really something an admin would want to change.
I have provided URLs to existing documentation about how to add a new database migration.
-- thanks, Abhilash Raj (maxking)
This is basic use on how fields look like in SQLAlchemy[1]. After you have added a field, you can use Alembic to autogenerate migrations for your changes in database schema. See [2] on how to write alembic migration from scratch.
You can (and should) just use alembic to autogenerate it using the command mentioned here[3].
Thanks for clarification!
"Admin" is used for operators of a project, this is not really something an admin would want to change
Ok, I understand your point.
It would be great if you used gender neutral pronouns[4]. Folks, People etc.
Yeah, I understand your point and will follow it
participants (2)
-
Aaryan Bhagat
-
Abhilash Raj