버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.
Sv translation
languageko_KR

Flyway is an automatic DB Migration solution. It is automatically run on install package during update. 

But if there is error , then we should check the log file which shows the problem (specific query which makes the error are also shown) as well as flyway db table to see the migrating status, 

then run the migrate using bat file or do the total manual db update. 


Screenshot below shows sql files in V7100 install package.

Image Modified


The version of official released MIS is first coming in sql file's name, and if there is additional changes then the number comes after the next "."

(ex. 4005.7.1)


If the flyway was NEVER been used before, then we need to let Flyway knows which version will be baseline to start

...

executing the query.

Meaning, define the current version and start "migrate" command on flyway.

Then Flyway will automatically

...

execute the sql file one by one in order to grow number from the the baseline.


This is the result when you did update from V4005.7 to V7100.0

Image Modified



Command to see the result above is this.

(sql_postgres : sql location for postgresql.   If db type is MSSQL then : sql_mssql )

"C:\MagicInfo Premium\flyway\flyway.cmd" -configFiles="C:\MagicInfo Premium\conf\config.properties","C:\MagicInfo Premium\flyway\conf\placeholder.conf" -locations=filesystem:"C:\MagicInfo Premium\flyway\sql_postgres" info



During the db update if db update fails, then the "State" changes to "Pending" on the fault sql file.

You can find the log & status on log file and db table. 

C:\MagicInfo Premium\flywaylog.txt


table : flyway_schema_history 


You can try re-update using this command.

"C:\MagicInfo Premium\flyway\flyway.cmd" -configFiles="C:\MagicInfo Premium\conf\config.properties","C:\MagicInfo Premium\flyway\conf\placeholder.conf" -locations=filesystem:"C:\MagicInfo Premium\flyway\sql_postgres" migrate



The command is long, but from V8 we support bat file which makes these easier.    ( C:\MagicInfo Premium\flyway\mis.bat )

Go to this directory

C:\MagicInfo Premium\flyway\mis.bat


Run the bat file using command.

mis.bat info

mis.bat migrate


When there is an issue during updating....

  1. If the original DB had problem on table so that the db update failed during Flyway update, then we need to fix the problem on db  first and then re-excute updating using "migrate" command. ( The reason/problem line is shown on flywaylog.txt)

      2. If update had failed, then that *.sql file's update state is "Pending"  and the excuted query before that line on that sql file will be REVERTED.

      3. Meaning we can re-excute sql from which hadn't been applied which is "Pending" state.

      4. Updae state is also written in DB table (flyway_schema_history )

      5. There are two ways to update

                  - Auto :  using "migrate" command

                  - Manual : excute sql file from lower number to bigger number one by one.

      6. If we do "manually updating" ,"flyway_schema_history" table has to be deleted totally (drop table) so that next verion update won't have problem/ or stuck during updating.


This is the flyway_schema_history  table.

Image Modified


Sv translation
languageen

Flyway is an automatic DB Migration solution. It is automatically run on install package during update. 

But if there is error , then we should check the log file which shows the problem (specific query which makes the error are also shown) as well as flyway db table to see the migrating status, 

then run the migrate using bat file or do the total manual db update. 


Screenshot below shows sql files in V7100 install package.

Image Added


The version of official released MIS is first coming in sql file's name, and if there is additional changes then the number comes after the next "."

(ex. 4005.7.1)


If the flyway was NEVER been used before, then we need to let Flyway knows which version will be baseline to start executing the query.

Meaning, define the current version and start "migrate" command on flyway.

Then Flyway will automatically execute the sql file one by one in order to grow number from the the baseline.


This is the result when you did update from V4005.7 to V7100.0

Image Added



Command to see the result above is this.

(sql_postgres : sql location for postgresql.   If db type is MSSQL then : sql_mssql )

"C:\MagicInfo Premium\flyway\flyway.cmd" -configFiles="C:\MagicInfo Premium\conf\config.properties","C:\MagicInfo Premium\flyway\conf\placeholder.conf" -locations=filesystem:"C:\MagicInfo Premium\flyway\sql_postgres" info



During the db update if db update fails, then the "State" changes to "Pending" on the fault sql file.

You can find the log & status on log file and db table. 

C:\MagicInfo Premium\flywaylog.txt


table : flyway_schema_history 


You can try re-update using this command.

"C:\MagicInfo Premium\flyway\flyway.cmd" -configFiles="C:\MagicInfo Premium\conf\config.properties","C:\MagicInfo Premium\flyway\conf\placeholder.conf" -locations=filesystem:"C:\MagicInfo Premium\flyway\sql_postgres" migrate



The command is long, but from V8 we support bat file which makes these easier.    ( C:\MagicInfo Premium\flyway\mis.bat )

Go to this directory

C:\MagicInfo Premium\flyway\mis.bat


Run the bat file using command.

mis.bat info

mis.bat migrate


When there is an issue during updating....

  1. If the original DB had problem on table so that the db update failed during Flyway update, then we need to fix the problem on db  first and then re-excute updating using "migrate" command. ( The reason/problem line is shown on flywaylog.txt)

      2. If update had failed, then that *.sql file's update state is "Pending"  and the excuted query before that line on that sql file will be REVERTED.

      3. Meaning we can re-excute sql from which hadn't been applied which is "Pending" state.

      4. Updae state is also written in DB table (flyway_schema_history )

      5. There are two ways to update

                  - Auto :  using "migrate" command

                  - Manual : excute sql file from lower number to bigger number one by one.

      6. If we do "manually updating" ,"flyway_schema_history" table has to be deleted totally (drop table) so that next verion update won't have problem/ or stuck during updating.


This is the flyway_schema_history  table.

Image Added