site structure deploy

6 views
Skip to first unread message

Maksim Borisov

unread,
Feb 21, 2012, 12:14:49 PM2/21/12
to diem-users
I've got an idea to improve development cycle.

Now we need to manualy copy widgets and pages records in database from
local-developer mashine to test & prod servers.
That's not comfortable enounght, in my projects I use special scripts
(save and load tasks) that stores nessesary data from database to a
dump file, and than recovers this data into database. So we can keep
structure of the project in versioning systems & easily deploy all
changes in page and widget states.

It woould be great to include such tasks in official build of Diem

Kye Etherton

unread,
Feb 21, 2012, 12:18:48 PM2/21/12
to diem-...@googlegroups.com
Sounds like a good idea to me. Write it in two tasks, a prepare and a deploy. The first makes the SQL and puts it into the data folder, named via timestamp is probably best. The second will then take it from the data folder and execute. That way rsync still works well.

Fork the diem repository and make the changes and then make a pull request and it shall be reviewed.

Kye Etherton
IT Manager
Pimlico Plumbers
T: 020 7928 8888
F: 020 7928 3333
http://www.Pimlicoplumbers.com

The contents of this e-mail (including any attachments) are confidential, for the recipient only and may be legally privileged. If you are not the intended recipient you should not print, copy or distribute this e-mail or use it or its contents or copy or publish its contents to any other person. If you have received this e-mail in error please notify the sender immediately and delete it from your system.

Stéphane

unread,
Feb 21, 2012, 12:25:16 PM2/21/12
to diem-...@googlegroups.com
Hi,

Have you ever played with doctrine migrations ?
It creates a table with a unique column named "version".

Consider doing the same, so on any db you can know which version of your sql has been injected.
Perhaps naming this table "diem_data_version" would be a good fit ?

Regards,

Jacek Jędrzejewski

unread,
Feb 21, 2012, 12:55:49 PM2/21/12
to diem-...@googlegroups.com
Sounds great!

Regards,
JJ.

Maksim Borisov

unread,
Feb 21, 2012, 7:41:19 PM2/21/12
to diem-users
I don't use migrations - it's too complicated and perhaps slow-
executing on big DB, just shell scripts using mysql & mysqldump with
certain tables I need
Originaly to copy project structure I need all dm_* tables exept
dm_media (group and translation here) & dm_users

Also there is some problems here, if I don't want to copy dm_medias
and I've got widget with dm_media used in it.
The same thing with users and users-permissions.

There are two ways to handle it:
1. not to use images widget & not to tie user with permissions (only
user->group->permission)
2. to write script with complicated logic

On 21 фев, 21:55, Jacek Jędrzejewski <jacek.jedrzejew...@gmail.com>
wrote:
> Sounds great!
>
> Regards,
> JJ.
Reply all
Reply to author
Forward
0 new messages