Uploaded image for project: 'YesCart'
  1. YesCart
  2. YC-513

[Suggestion for DB migration] use Liquibase for data base versioning and migration

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0, backlog
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      After this YC-511 issue, I found out that you use pure SQL scripts for database migration. There is an alternate way to migrate and version database using Liquibase. Using this framework yo write data base changelog files instead of pure SQL scripts. Also it supports multiple data base platforms like MySQL, MSSql, Orable and so on.

      Ok, let's move on with examples. Let say you have YES 2.2.0 version database. On 2.2.1 you have created new column Searchable for entity Product. So all you have to do is
      create liquibase changeset file for this new version with it's scripts.

      <changeSet author="john.doe" id="1-creating-nice-column">
      <addColumn tableName="Product">
      <column name="searchable" type="BOOLEAN"/>
      </addColumn>
      </changeSet>

      So, after that you will need to execute this script and database will be updated. Later, if you add more changelogs to the same file, and rerun those scripts, only those new scripts will execute.

      This tool is very useful.

      More info can be found here:
      http://www.liquibase.org/
      http://www.liquibase.org/documentation/maven/

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                InspireSoftware InspireSoftware
                Reporter:
                Anonymous
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: