in Education by
I often run into the following problem. I work on some changes to a project that require new tables or columns in the database. I make the database modifications and continue my work. Usually, I remember to write down the changes so that they can be replicated on the live system. However, I don't always remember what I've changed and I don't always remember to write it down. So, I make a push to the live system and get a big, obvious error that there is no NewColumnX, ugh. Regardless of the fact that this may not be the best practice for this situation, is there a version control system for databases? I don't care about the specific database technology. I just want to know if one exists. If it happens to work with MS SQL Server, then great. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
In Ruby on Rails, there's a concept of a migration -- a quick script to change the database. You generate a migration file, which has rules to increase the db version (such as adding a column) and rules to downgrade the version (such as removing a column). Each migration is numbered, and a table keeps track of your current db version. To migrate up, you run a command called "db:migrate" which looks at your version and applies the needed scripts. You can migrate down in a similar way. The migration scripts themselves are kept in a version control system -- whenever you change the database you check in a new script, and any developer can apply it to bring their local db to the latest version.

Related questions

0 votes
    Private builds are executed after moving the changes to version control. (i)True (ii)False...
asked Oct 5, 2020 in Technology by Editorial Staff
0 votes
    I am relatively new to bazaar (primarily used cvs, then subversion, and at my current job we're ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Git is a ___________________________ version control system. (i)Centralized (ii)Distributed (iii)Local (iv)None of the options...
asked Oct 5, 2020 in Technology by Editorial Staff
0 votes
    Explain the difference between a centralized and distributed version control system (VCS)....
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    2 True or False statement- (a) Projector is a storage device. (b) i7 is a high speed processor. (c) ... is a large area network. Select the correct answer from above options...
asked Nov 28, 2021 in Education by JackTerrance
0 votes
    ___option in word changes the structure and layout of pages . 1. format 2. page setup 3. print and print preview 4. Proofing Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    Right now, we are using Perforce for version control. It has the handy feature of a strictly increasing ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    Right now, we are using Perforce for version control. It has the handy feature of a strictly increasing ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    I've always just FTPed files down from sites, edited them and put them back up when creating sites, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    Name the command to create a new directory under version control?...
asked Feb 21, 2021 in Technology by JackTerrance
0 votes
    Under Version control, how you will create a new directory in SVN?...
asked Feb 21, 2021 in Technology by JackTerrance
0 votes
    Which is the current version of ASP.NET AJAX Control Toolkit?...
asked Dec 31, 2020 in Technology by JackTerrance
0 votes
    stream based version control helps to apply bug fixes to many versions of the application. (i)False (ii)True...
asked Oct 5, 2020 in Technology by Editorial Staff
0 votes
    Build can be triggered by a version control tool. (i)True (ii)False...
asked Oct 5, 2020 in Technology by Editorial Staff
0 votes
    Git, Mercurial and Subversion are centralized version control tools. (i)False (ii)True...
asked Oct 5, 2020 in Technology by Editorial Staff
...