Skip to content

Commit

Permalink
[Improvement] Rename column num in migration_log table to migration_n…
Browse files Browse the repository at this point in the history
…umber (#23)

rename num column in migration_log table to migration_number
  • Loading branch information
atedesch1 authored May 19, 2022
1 parent 9bb2df7 commit b4a51c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/mysql/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (d *mySqlDriver) HasAppliedMigrationsTable() (bool, error) {

func (d *mySqlDriver) CreateMigrationsLogsTable() error {
_, err := d.tx.Exec(`CREATE TABLE migration_log (
num INTEGER,
migration_number INTEGER,
type VARCHAR(4),
username VARCHAR(32),
date VARCHAR(32)
Expand Down Expand Up @@ -172,7 +172,7 @@ func (d *mySqlDriver) DropAppliedMigrationsTable() error {

func (d *mySqlDriver) InsertIntoMigrationLog(migrationNum int, migrationType string, username string, currentDate string) error {
_, err := d.tx.Exec(`INSERT INTO migration_log (
num,
migration_number,
type,
username,
date
Expand Down
4 changes: 2 additions & 2 deletions drivers/postgres/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (d *postgresDriver) HasAppliedMigrationsTable() (bool, error) {

func (d *postgresDriver) CreateMigrationsLogsTable() error {
_, err := d.tx.Exec(`CREATE TABLE migration_log(
num INTEGER,
migration_number INTEGER,
type VARCHAR(4),
username VARCHAR(32),
date VARCHAR(32)
Expand Down Expand Up @@ -169,7 +169,7 @@ func (d *postgresDriver) DropAppliedMigrationsTable() error {

func (d *postgresDriver) InsertIntoMigrationLog(migrationNum int, migrationType string, username string, currentDate string) error {
_, err := d.tx.Exec(`INSERT INTO migration_log (
num,
migration_number,
type,
username,
date
Expand Down

0 comments on commit b4a51c0

Please sign in to comment.