Commit 4498ce99 authored by Christian Pointner's avatar Christian Pointner
Browse files

try to fix formatting issue. (cont'd)

parent 39b46d40
Pipeline #427 passed with stages
in 16 minutes and 16 seconds
......@@ -31,10 +31,10 @@ There are several possible workarounds for the problem:
You can do this by adding the following to the `[mysqld]` section of
`/etc/mysql/mariadb.conf.d/50-server.cnf`:
```ini
innodb_file_format = Barracuda
innodb_file_per_table = On
innodb_large_prefix = On
innodb_default_row_format = dynamic
innodb_file_format = Barracuda
innodb_file_per_table = On
innodb_large_prefix = On
innodb_default_row_format = dynamic
```
As far as i can see Ubuntu did not add this patch to it's packages but starting with 10.2
MariaDB uses the new format by default. This means you can work around the issue by using
......@@ -51,35 +51,35 @@ innodb_default_row_format = dynamic
enough to not exceed the limit.
```patch
diff --git a/store/types.go b/store/types.go
index 8576c7b..df99125 100644
--- a/store/types.go
+++ b/store/types.go
@@ -69,7 +69,7 @@ func (e ErrInvalidMetadataField) Error() string {
//******* Shows
type Show struct {
- Name string `json:"name" gorm:"primary_key"`
+ Name string `json:"name" gorm:"primary_key;size:191"`
CreatedAt time.Time `json:"created"`
UpdatedAt time.Time `json:"updated"`
}
@@ -169,7 +169,7 @@ type File struct {
ID uint64 `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created"`
UpdatedAt time.Time `json:"updated"`
- ShowName string `json:"show" gorm:"not null;index"`
+ ShowName string `json:"show" gorm:"not null;index;size:191"`
Show Show `json:"-" gorm:"association_foreignkey:Name"`
Source FileSource `json:"source" gorm:"embedded;embedded_prefix:source__"`
Metadata FileMetadata `json:"metadata" gorm:"embedded;embedded_prefix:metadata__"`
@@ -194,7 +194,7 @@ type Playlist struct {
ID uint64 `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created"`
UpdatedAt time.Time `json:"updated"`
- ShowName string `json:"show" gorm:"not null;index"`
+ ShowName string `json:"show" gorm:"not null;index;size:191"`
Show Show `json:"-" gorm:"association_foreignkey:Name"`
Entries []PlaylistEntry `json:"entries,omitempty"`
}
diff --git a/store/types.go b/store/types.go
index 8576c7b..df99125 100644
--- a/store/types.go
+++ b/store/types.go
@@ -69,7 +69,7 @@ func (e ErrInvalidMetadataField) Error() string {
//******* Shows
type Show struct {
- Name string `json:"name" gorm:"primary_key"`
+ Name string `json:"name" gorm:"primary_key;size:191"`
CreatedAt time.Time `json:"created"`
UpdatedAt time.Time `json:"updated"`
}
@@ -169,7 +169,7 @@ type File struct {
ID uint64 `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created"`
UpdatedAt time.Time `json:"updated"`
- ShowName string `json:"show" gorm:"not null;index"`
+ ShowName string `json:"show" gorm:"not null;index;size:191"`
Show Show `json:"-" gorm:"association_foreignkey:Name"`
Source FileSource `json:"source" gorm:"embedded;embedded_prefix:source__"`
Metadata FileMetadata `json:"metadata" gorm:"embedded;embedded_prefix:metadata__"`
@@ -194,7 +194,7 @@ type Playlist struct {
ID uint64 `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created"`
UpdatedAt time.Time `json:"updated"`
- ShowName string `json:"show" gorm:"not null;index"`
+ ShowName string `json:"show" gorm:"not null;index;size:191"`
Show Show `json:"-" gorm:"association_foreignkey:Name"`
Entries []PlaylistEntry `json:"entries,omitempty"`
}
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment