Browse Source

Rename database tables

Vova Tkach 5 years ago
parent
commit
aab53dd8e4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      modules/module_index_act_delete.go
  2. 1 1
      modules/module_index_act_mysql_setup.go

+ 1 - 1
modules/module_index_act_delete.go

@@ -22,7 +22,7 @@ func (this *Modules) RegisterAction_IndexDelete() *Action {
 
 		err := wrap.DB.Transaction(wrap.R.Context(), func(ctx context.Context, tx *wrapper.Tx) error {
 			// Process
-			if _, err := tx.Exec(ctx, "DELETE FROM pages WHERE id = ?;", utils.StrToInt(pf_id)); err != nil {
+			if _, err := tx.Exec(ctx, "DELETE FROM fave_pages WHERE id = ?;", utils.StrToInt(pf_id)); err != nil {
 				return err
 			}
 			return nil

+ 1 - 1
modules/module_index_act_mysql_setup.go

@@ -561,7 +561,7 @@ func (this *Modules) RegisterAction_IndexMysqlSetup() *Action {
 		}
 		if _, err = tx.Exec(
 			wrap.R.Context(),
-			`INSERT INTO fave_settings (name, value) VALUES ('database_version', '000000020');`,
+			`INSERT INTO fave_settings (name, value) VALUES ('database_version', '000000021');`,
 		); err != nil {
 			tx.Rollback()
 			wrap.MsgError(err.Error())