Answer the question
In order to leave comments, you need to log in
Should I paste application settings in migrations?
Hello!
The database has a table app_settings for storing application settings with the following structure:
id - record id,
key - setting name,
value - setting value,
description - description.
Example:
1, admin_email, [email protected], Administrator email
2, site_name, Test, Site name
......
Is it worth inserting settings names (admin_email, site_name ...) into the table in migrations, or better not costs? How good is this practice?
As far as I know, migrations are used only to change the structure of tables; inserting data seems to be not allowed. But in this case, the performance of the application depends on the data.
Answer the question
In order to leave comments, you need to log in
Data is inserted during migrations, but static data that is not changed by system users, for example, a list of currencies, cities, countries, etc., etc.
But, accordingly, the data that is changed by users, and the settings you listed relate to them, should not be touched, they may need to be set at the time of system installation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question