Replies: 1 comment 2 replies
-
Hello, The issue that you faced is due to the Monarc version upgrade and use of PHP8. Some packages required updates and some migrations were deprecated/broken as a result. Regarding the database initialisation. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm trying to fully automate a simple MONARC deployment, including ONLY the FO (with no BO, RPX and CFG).
I'm quite comfortable with ansible, and based my activities on the official ansible-ubuntu project.
At the moment, I'm able to almost deploy a fully-working FO, on a stock Ubuntu 20.04 box, via the ansible playbook and roles I released here [A-GPL] [my monarcco and monarcfo roles are HEAVILY based on official ones]
Unfortunately, at the moment, I'm having problems INITIALIZING THE DATABASE.
After creating the two databases monarc_common and monarc_cli [see here] and creating the user [see here], I tried to initialize the database by the way of:
[...]/module/Monarc/Core/migrations/db/
[...]/module/Monarc/FrontOffice/migrations/db/
(related ansible tasks are here)
Unfortunately, after succesfully applying the first migration ( 20160513123336_initial_db.php ), the second one ( 20160602124700_remove_anr_id_rolf_tables.php ) raise an error.
namely, the SQL statement
ALTER TABLE 'rolf_tags' DROP COLUMN 'anr_id';
failed!If I connect to MariaDB to give a look:
it seems that the
anr_id
field is there. But if I launch theALTER TABLE
statement used by the migration:I got a "doesn't exist" error.
As I'm not much a SQL-voodoo guy... I'm not understanding where the error is.
So, here I am, asking you the main question:
Which is the proper way to initialize the database, with tables, indexes and the likes, right after its creation? Should I run the migrations? Or there are other/better approaches (BTW: I see a db-bootstrap folder, in the sources, so I'm a bit puzzled);
once above initialization will be properly performed, how can I "seed" database content properly? Via including Core & FrontOffice "seeds"? Or with some other content/dump?
Please note that, in the meantime, I simply dumped/restored the database included in the OVA virtual appliance.
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions