Skip to content

Commit

Permalink
[change] table type length
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Dec 1, 2024
1 parent 34b29f0 commit b8625b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/core/db/common/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const iptv = pgTable('iptv', {
const channel = pgTable('channel', {
id: uuid().defaultRandom(),
name: varchar('name', { length: 255 }),
url: varchar('url', { length: 255 }),
url: varchar('url', { length: 510 }),
group: varchar('group', { length: 255 }),
});

Expand Down
2 changes: 1 addition & 1 deletion src/main/core/db/migration/modules/update0_0_0to3_3_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const update = async () => {
CREATE TABLE IF NOT EXISTS tbl_channel (
id uuid DEFAULT gen_random_uuid(),
name varchar(255) not null,
url varchar(255) not null,
url varchar(510) not null,
"group" varchar(255)
);
Expand Down
2 changes: 2 additions & 0 deletions src/main/core/db/migration/modules/update3_3_8to3_3_9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const update = async () => {
ALTER TABLE tbl_site rename search_new to search;
ALTER TABLE tbl_drive ADD COLUMN "showAll" boolean default false;
ALTER TABLE tbl_channel ALTER COLUMN url TYPE varchar(510);
`);

const old_version = await db.select().from(schema.setting).where(eq(schema.setting.key, 'version'));
Expand Down

0 comments on commit b8625b3

Please sign in to comment.