-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
admin_user_audit tablosundaki description alanin kapasitesi 255 e cik…
…arildi, closes #20, closes #21. siparis girislerinde teslim tarihi girildiginde hata aliniyordu, closes #22. siparis fisi onaylama formunda aramalar islem tarihinden yapiliyordu, teslim tarihi olarak degistirildi.
- Loading branch information
Showing
17 changed files
with
79 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
app/db/migration/V1_0_6__Increasing_desdciption_length_in_AdminUserAudit_table.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package db.migration; | ||
|
||
import java.sql.Connection; | ||
import java.sql.Statement; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import utils.GlobalCons; | ||
|
||
import com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration; | ||
|
||
/** | ||
* AdminUserAudit tablosudaki 'Description' alaninin uzunlugu 100'den 255'e cikarildi | ||
* | ||
* @author mdpinar | ||
*/ | ||
|
||
public class V1_0_6__Increasing_desdciption_length_in_AdminUserAudit_table implements JdbcMigration { | ||
|
||
private final static Logger log = LoggerFactory.getLogger(V1_0_6__Increasing_desdciption_length_in_AdminUserAudit_table.class); | ||
|
||
@Override | ||
public void migrate(Connection con) throws Exception { | ||
log.info("Altering AdminUserAudit table to increase Description field length is executing..."); | ||
|
||
if (! GlobalCons.isInitScriptExecuted) { | ||
Statement sta = con.createStatement(); | ||
sta.executeUpdate("alter table admin_user_audit add column descr varchar(255)"); | ||
sta.executeUpdate("update admin_user_audit set descr = description"); | ||
sta.executeUpdate("alter table admin_user_audit drop column description"); | ||
|
||
if (GlobalCons.dbVendor.equals("mysql")) { | ||
sta.executeUpdate("alter table admin_user_audit change descr description varchar(255)"); | ||
} else if (GlobalCons.dbVendor.equals("mssql")) { | ||
sta.executeUpdate("EXEC sp_rename 'admin_user_audit.descr', 'description', 'COLUMN';"); | ||
} else if (GlobalCons.dbVendor.equals("h2")) { | ||
sta.executeUpdate("alter table admin_user_audit alter column descr rename to description"); | ||
} else { | ||
sta.executeUpdate("alter table admin_user_audit rename column descr to description"); | ||
} | ||
} | ||
|
||
log.info("AdminUserAudit table has been altered."); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters