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 8578031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:17:41+00:00 2026-06-11T20:17:41+00:00

We have a database in production that already has a good number of rows

  • 0

We have a database in production that already has a good number of rows in the “user” table. Consider the following statement from the flyway website:

If you have an existing database that has not been filled by Flyway
this is the way to go:

  • Create an initial migration script that will recreate your current
    state and give it a low version number.
  • Use flyway:init to create the metadata table and set this script as the current version.

I’d like to use flyway to manage my schema and various constants in the database, but I don’t want V1__Base_version.sql to contain the account information for our current production users, especially considering it’s stored in SCM. If I understand these instructions correctly though, I would need the ability to “recreate [my] current state” with V1__Base_version.sql.

So would creating an initial migration with just the schema and the constants work okay? Or do the databases on our workstations need to match those in production 100%?

  • 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-11T20:17:43+00:00Added an answer on June 11, 2026 at 8:17 pm

    You are correct. The init command is there to mark the production database with a version.

    The initial migration you create (with the structure of your PROD db) is for the other environments. It will never run on PROD as its version will be below the init version. It will however align all environments so that subsequent migrations can be applied equally across all of them.

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

Sidebar

Related Questions

Using Grails database-migration I have a table in production defined like so: +--------------+------------+------+-----+---------+----------------+ |
I have a production database where I have renamed several column's that are foreign
I have a SQL Server 2008 database. This database has a table called Product,
I have a production database where usage statistics reside. This database is responsible for
Let's say I have two database instances: InstanceA - Production server InstanceB - Test
We have been storing our staging database on the production database server with the
We have recently improved the schema of our production database, changing column names and
So, we have a mirror of a santized version of the production database. Is
Problem: I have a symfony project with a database full of production data I
I have the following (simplified) database tables: Products - ProductID, int, PK - Name,

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.