Skip to content

Commit

Permalink
Merge pull request #62 from zurdi15/develop
Browse files Browse the repository at this point in the history
merge develop into master
  • Loading branch information
zurdi15 authored Mar 28, 2023
2 parents 6e3f3c9 + 9f71b0c commit 13b1211
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
8 changes: 4 additions & 4 deletions backend/src/models/platform.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sqlalchemy import Column, String, Integer
from sqlalchemy import Column, String, Integer, Text

from config.config import DEFAULT_PATH_LOGO
from models.base import BaseModel
Expand All @@ -8,7 +8,7 @@ class Platform(BaseModel):
__tablename__ = 'platforms'
igdb_id = Column(String(length=50), default="")
sgdb_id = Column(String(length=50), default="")
slug = Column(String(length=100), primary_key=True)
name = Column(String(length=200), default="")
path_logo = Column(String(length=500), default=DEFAULT_PATH_LOGO)
slug = Column(String(length=500), primary_key=True)
name = Column(String(length=500), default="")
path_logo = Column(Text, default=DEFAULT_PATH_LOGO)
n_roms = Column(Integer, default=0)
14 changes: 7 additions & 7 deletions backend/src/models/rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

class Rom(BaseModel):
__tablename__ = 'roms'
filename = Column(String(length=200), primary_key=True)
filename_no_ext = Column(String(length=200), default="")
filename = Column(String(length=500), primary_key=True)
filename_no_ext = Column(String(length=500), default="")
r_igdb_id = Column(String(length=50), default="")
p_igdb_id = Column(String(length=50), default="")
r_sgdb_id = Column(String(length=50), default="")
p_sgdb_id = Column(String(length=50), default="")
name = Column(String(length=100), default="")
r_slug = Column(String(length=100), default="")
p_slug = Column(String(length=100), default="")
name = Column(String(length=500), default="")
r_slug = Column(String(length=500), default="")
p_slug = Column(String(length=500), default="")
summary = Column(Text, default="")
path_cover_s = Column(String(length=500), default=DEFAULT_PATH_COVER_S)
path_cover_l = Column(String(length=500), default=DEFAULT_PATH_COVER_L)
path_cover_s = Column(Text, default=DEFAULT_PATH_COVER_S)
path_cover_l = Column(Text, default=DEFAULT_PATH_COVER_L)
has_cover = Column(Boolean, default=False)
size = Column(String(length=20), default="")
24 changes: 24 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# v1.3 (_29-03-2023_)

## Fixed
**`Breaking change`** - **This breaking change only applies for mariaDB users**:

Some users reported errors when scanning files with large names because filenames are limited to 100 characters in the database. As I want to give as much flexibility as possible I changed some database columns.

If you didn't make a lot of manual changes you can just get rid of the database and recreate it, scanning your library again. If you did some changes and don't want to lose the progress, you should do this changes manually from the mariadb container (or wherever you have your mariadb database) since there is not any kind of CLI for this migration.

I am so sorry for any inconvenience this can generate.

Columns to modify (examples in case that you set it with database name as romm, in other case just change the database name in the {db_name}.roms part):
- alter table romm.roms modify column filename varchar(500);
- alter table romm.roms modify column filename_no_ext varchar(500);
- alter table romm.roms modify column name varchar(500);
- alter table romm.roms modify column r_slug varchar(500);
- alter table romm.roms modify column p_slug varchar(500);
- alter table romm.roms modify column path_cover_l text;
- alter table romm.roms modify column path_cover_s text;
- alter table romm.platforms modify column slug varchar(500);
- alter table romm.platforms modify column name varchar(500);
- alter table romm.platforms modify column path_logo text;


# v1.2.2 (_28-03-2023_)

## Added
Expand Down

0 comments on commit 13b1211

Please sign in to comment.