Skip to content

Commit

Permalink
Removed tagType in v3+
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Sep 28, 2023
1 parent e5c7410 commit 6ed74da
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 73 deletions.
9 changes: 0 additions & 9 deletions migration/v10/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
UUID *string `gorm:"uniqueIndex"`
Expand Down
2 changes: 1 addition & 1 deletion migration/v3/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Migration struct{}
func (r Migration) Apply(db *gorm.DB) (err error) {
//
// Tags/Categories.
err = db.Migrator().RenameTable(model.TagType{}, model.TagCategory{})
err = db.Migrator().RenameTable(v2.TagType{}, model.TagCategory{})
if err != nil {
err = liberr.Wrap(err)
return
Expand Down
9 changes: 0 additions & 9 deletions migration/v3/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
Name string `gorm:"index;unique;not null"`
Expand Down
9 changes: 0 additions & 9 deletions migration/v4/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
Name string `gorm:"index;unique;not null"`
Expand Down
9 changes: 0 additions & 9 deletions migration/v5/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
Name string `gorm:"index;unique;not null"`
Expand Down
9 changes: 0 additions & 9 deletions migration/v6/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
Name string `gorm:"index;unique;not null"`
Expand Down
9 changes: 0 additions & 9 deletions migration/v7/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
UUID *string `gorm:"uniqueIndex"`
Expand Down
9 changes: 0 additions & 9 deletions migration/v8/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
UUID *string `gorm:"uniqueIndex"`
Expand Down
9 changes: 0 additions & 9 deletions migration/v9/model/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,6 @@ type Tag struct {
Category TagCategory
}

type TagType struct {
Model
Name string `gorm:"index;unique;not null"`
Username string
Rank uint
Color string
Tags []Tag `gorm:"constraint:OnDelete:CASCADE"`
}

type TagCategory struct {
Model
UUID *string `gorm:"uniqueIndex"`
Expand Down

0 comments on commit 6ed74da

Please sign in to comment.