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

  • SEARCH
  • Home
  • 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 8016359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:31:10+00:00 2026-06-04T20:31:10+00:00

I have a database that I’ll have to use to build my application. It

  • 0

I have a database that I’ll have to use to build my application. It was modeled by somebody else, but it follows rails conventions. I can easily map it with Active Record.

Can I use migrations to make profound changes to that database or should I keep modeling with the diagrams and exporting it?

Is it a good practice to use migrations or scaffoldings on top of previously modeled databases?

Because after scaffolding I usually get stuck with some kind of evil error messages saying there is a migration trying to create an already existing table. When I delete the problematic migration it only get worst.

For this question: agnostic means use any external modeling tool (GUI SGBD tools).

  • 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-06-04T20:31:12+00:00Added an answer on June 4, 2026 at 8:31 pm

    You can basically go either route. Which one you choose will depend on your development style.

    If you do scrum/agile it makes a strong case for doing migrations going forward.

    Migrations are also basically part of the big picture for rails and are one of the pieces that makes it work so well in terms of development process. A huge bonus of migrations is that you can create the app with whichever database you want, which is great when moving it to another provider*. However with an db that wasn’t entirely done with migrations there will be two steps to do this – create the initial db ‘up to’ when migrations were started and then continue using them.

    Migrations and scaffolding are fine on top of an existing database. Migrations are adding (or removing) new db stuff and scaffolds can create new db record (when migrations are run) and they really help in following the rails standard and creating things like conventionally named.stub tests files.

    When first getting used to migrations the error messages and the syntax is pretty maddening but it’s one of those things you’ll get better at over time. There’s a lot of that kinda stuff in rails, i.e. learning all the bits and allowing for weird error messages.

    Tools that help out in this area are mySQL Workbench (obv. for mysql) and rubyMine IDE Each of those tools will let you look at an existing database and you can even compare an ERD from mySQL usng the actual tables with rubyMine’s “Model Dependency Diagram” ERD using the information in the rails models.

    *however moving the actual data for a live app is another matter.

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

Sidebar

Related Questions

I have a database that holds a time as UTC. This time can be
I have a database that looks like this: I can generate a tree from
I have one database that has a bigger size than expected, how can I
I have database tables that look like this: A Task can be mapped to
i have DataBase function that calculate distance by coordinates CREATE OR REPLACE FUNCTION distance(lat1
I have a Database that contains data about articles , structures and manufacturers .
I have a database that I have created using SQL Server Developer 2008. I
I have a database that I would like to leverage with Zend_Search_Lucene . However,
I have a database that tracks players through their attempts at a game. To
I have a database that has node & nodetype tables. Nodes table NodeID ParentNodeID

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.