Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4066350
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:07:15+00:00 2026-05-20T16:07:15+00:00

I have several (old) Drupal-sites that need to be replaced with one single new

  • 0

I have several (old) Drupal-sites that need to be replaced with one single new Rails app. That new site should hold all old Drupal-content. That old Drupal-content is partly broken (due to nearly 7 years of fugly upgrades, discontinued modules and so on). The fact that it is Drupal is hardly relevant, just the fact that it causes some inconsistencies, weird naming, and badly normalised tables.

The content needing to be imported into the Rails app is simple: content (blog-entries), attached files (images) and comments. I have the luxury of two databases being “stale” (not in production) and two more being in production, but allowed to go down/locked for a while (hours, days). So, the migrations need not be optimized for speed, or be entirely save (meaning: I can afford to loose a comment being posted while running the migration)

The Rails(3) app is mostly done, and using Active-record conventions only.

Due to the contraints (broken, inconsistent database, several databases needing merging) I prefer to write migrations for this, instead of connecting my new Rails app to an ugly, inconsistent legacy databse.

My questions are:

  • Are there any environments, gems or tools that make importing in Rails easier: e.g. something that allows simple mapping from old-new in some DSL.
  • Or is it easier to write my migrations entirely in SQL: SQL queries that will turn the old data into the structure that fits the Rails app? Migrating is from MySQL->MySQL.
  • Or should I just connect Activerecord to the old databases, loop over each row/result and run an Object.save! in my rails app?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:07:16+00:00Added an answer on May 20, 2026 at 4:07 pm

    Interesting case, I am facing the same issue on my current project.

    I think you should consider the second point!

    Or is it easier to write my migrations
    entirely in SQL: SQL queries that will
    turn the old data into the structure
    that fits the Rails app? Migrating is
    from MySQL->MySQL.

    Write the SQL migrations to import the data from your old database to the new one, then work with the new schema! I suppose you have a dump SQL file with a list of INSERT queries for each old-database.

    So the strategy for this could be:

    1. Create one SQL view for each table of the old database schema, from your new schema.
    2. Run those INSERT against your views.

    At first, I was going to tell you about the legacy_data gem which basically generates all the model layer with the appropriate validations/associations, but it is useless in your case given that you already have all the necessary models set up in your Rails application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several old 3.5in floppy disks that I would like to backup. My
We have several .NET applications that monitor a directory for new files, using FileSystemWatcher.
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on
We have several jobs that run concurrently that have to use the same config
I have several applications that are part of a suite of tools that various
I have several log files of events (one event per line). The logs can
I have several ASP:TextBox controls on a form (about 20). When the form loads,
I have several tables whose only unique data is a uniqueidentifier (a Guid) column.
We have several wizard style form applications on our website where we capture information
I have several user controls, let's say A , B , C and D

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.