Skip to content

Commit

Permalink
archive
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Feb 19, 2025
1 parent 4e8a7ef commit c7b1273
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db/schema/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func GetMigrationScript(db *gorm.DB) []string {
//q = append(q, ddl.FromStatement(stmt).Constrains(constraints, is)...)
tail = append(tail, ddl.FromStatement(stmt).Constrains(constraints, is)...)
if len(q) > 0 {
queries = append(queries, "\r\n\r\n-- Migrate Table:"+stmt.Schema.Table)
queries = append(queries, "\r\n\r\n-- Migrate Model: "+stmt.Schema.ModelType.Name()+"("+stmt.Schema.Table+")")
queries = append(queries, q...)
}
if caller, ok := el.(interface {
Expand Down
9 changes: 9 additions & 0 deletions lib/db/types/archive.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package types

type Archive struct {
Archive bool `gorm:"column:archive" json:"archive"`
}

func (v *Archive) SetArchive(archive bool) {
v.Archive = archive
}

0 comments on commit c7b1273

Please sign in to comment.