Migraine Script for Drupal-6

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
kevin.gomes's picture

The Migraine script
http://www.shearersoftware.com/software/server-administration/migraine/

Table in Drupal Database are divided in 6 Categories:

  1. config
  2. content
  3. temp
  4. cache
  5. sequence
  6. ignore

I'm using the same script for Drupal6, but now that sequences table doesn't exist; the script spits out some errors about the non-existence of sequences table. The sql dumps are created but can this affect the migration in any way?
The script would need an update!

Comments

Hi Kevin, Sequences is a

mukesh.agarwal17's picture

Hi Kevin,

Sequences is a part of D5; in D6, they use db_next_id() to implement the auto increment, so no worries now. I havent tried this yet, but just remove the sequences table from the python script, i.e. sequence_tables="" and not sequence_tables="sequences". I hope this helps. If you still have problems, please post the exact problem, I will look at it today!!!

Mukesh

Cheers,
Mukesh Agarwal
www.innoraft.com

I tried that..

kevin.gomes's picture

I tried doing sequence_tables="", but that didn't stop the errors. I looked into the python script and found reference to the sequence_tables and an sql query separately written for that. The code doesn't consider the existence of a valid string in the variable sequence_tables.
Probably we can have some conditional processing for the existence of sequences, without modifying much part of the code.

Try this

mukesh.agarwal17's picture

Hi Kevin,

I do not have a drupal 6 installation with me, and therefore cannot test what i think might work. However, I suggest the following:
1> Comment the line:
{'filename': 'sequences.sql', 'tables': sequence_tables, 'data': True} -- in the function dump_db

2> Comment the lines:
sequences = get_query_result(host, user, password, db,
'SELECT name, id FROM sequences ORDER BY name')
open(filepathprefix + 'sequences.txt', 'w').write(sequences)

3> Comment the line:
{'filename': 'sequences.sql', 'tables': sequence_tables,
'enabled': not keepcontent and not keeptemp and not keepconfig} -- in the function restore_db

4> Comment the lines starting from "#merge sequences" to "if migrationtimestamp:"

I guess these lines are essentially the code behind handling sequences. If you are successful, then let us know, so that we update the script and post it for drupal 6 on the page : http://www.shearersoftware.com/software/server-administration/migraine/

Mukesh

Cheers,
Mukesh Agarwal
www.innoraft.com

Something more

kevin.gomes's picture

Commenting those lines isn't enough. Something more needs to be done.

Missed out something

mukesh.agarwal17's picture

all_known_tables_dict variable in the function dump_db should be edited to exclude sequence_tables... I hope this time it helps :)

Mukesh

Cheers,
Mukesh Agarwal
www.innoraft.com

Webform module tables (content or config)

kevin.gomes's picture

I've considered all the tables added by the webform module to be content, because they refer to the nid. Is this right?
Does that mean if I create new nodes of type webform on my development server, i can't update them to the production server with migraine script.

nid => content

mukesh.agarwal17's picture

any table which contains nid, commentid, uid goes into content. It is therefore always suggested to design the schema of custom modules such that they never have all in one table.

Yes, any content created on development server cannot be updated to production server. This means that you need to recreate the content on the production server.

Mukesh

Cheers,
Mukesh Agarwal
www.innoraft.com

Workaround

Sumeet.Pareek's picture

If the migraine script is giving errors because there is no such table in D6, a simple workaround would be to create such an empty table on all instances. That should make the script run with a lot of sequence warnings :)

I've been getting tons of

tommy--mason's picture

I've been getting tons of errors myself with the script too. It's giving me a Migraine headache!

Specifics please :)

Sumeet.Pareek's picture
  • Are you using the script with D5 or D6?
  • What are the kinds of errors that you are getting?

Migraine ready for D6

mukesh.agarwal17's picture

Hi Kevin,

One of my friends has used Migraine to work good enough for a D6 site, I will ask him to post the script here.

Mukesh

Cheers,
Mukesh Agarwal
www.innoraft.com

Migraine D6 script

anil614sagar-gdo's picture

Hi kevin,

I am attaching d6 script for migraine. It worked perfectly for me. Let me know if any problems are there. Since there is no sequence table concept in D6 i removed the code related to it. I tested the script its working fine.

Anil Sagar

D6 version ready

blisstering's picture

The Drupal 6 version of the Migraine script is ready... Please follow the link:
http://www.blisstering.com/migraine-synchronize-your-development-staging...

Link broken

blisstering's picture

The link got broken -- sharing again http://tinyurl.com/yll3v2z

Trying to figure this out

mahnster's picture

Hi All / Creators of Migraine:

I am trying to figure this out, as I had hoped this would help me in the place I need help, getting content from the devel/staging server put on the the production server while at the same time maintaining new content that users have put on the production server.

My situation is this: on the development site, this is when we add tons of new pages of content for users to view, for when our site goes to a new version. Also, we use different content nodes for various things, from email templates (our site sends various emails to users based on events, such as when they submit a project proposal for others to view, and they need to have translation ability) to tip and tricks, to FAQ entries, etc.

So, I was hoping Migraine made it so these nodes mentioned aboved could be merged with user nodes, such a blog entries. Is that not the case? Can't it export rows from the node table that match, say, type="faq" or type="email_template", but leave the other types alone? Of course, this brings to question how it would handle content types made from custom modules (which mine are, such as the email templates) that have fields in their own database table as well, such as my emails having a "Subject", "Default From", "HTML/text" fields.

Is this possible? I would prefer to set up all site content on the devel/staging servers, then get this, as well as settings/configuration updated on the production server. Please let me know how this can be done.

Thanks

Hi Rich, Glad to hear from

sunitgala's picture

Hi Rich,

Glad to hear from you. Our main Migraine developer, Mukesh Agarwal, is out sick this week. Hopefully he'll be back next week and can answer your question. You can reach him directly at Mukesh.Agarwal@blisstering.com.

I'm just the messenger boy (so to speak :-)), and have no idea how to answer your question. We'll try and ping you next week, but in case you don't hear from us, please do drop us a note and we'll help you as best we can.

Cheers,
Sunit.

PS. Many apologies if I've broken any taboos of the group -- it's probably my first post here though I often lurk, and have been lurking for 4+ years now :-).


sunit.gala@blisstering.com || 650-302-4988

India

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: