Fix: pnpm-lock.yamlの破損 / Fix: minimumReleaseAgeExcludeにtinyglobbyを追加 / Fix: マイグレーションファイルの破損
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
|
||||
export class Migration20260302212455 extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`alter table "user" add column "password" varchar(60) not null;`);
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(`alter table "user" drop column "password";`);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
|
||||
export class Migration20260327135046 extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`create table "token" ("name" varchar(64) not null, "passphrase" text not null, "user_id" varchar(10) not null, "is_native" boolean not null, "created_at" timestamptz not null, "last_used_at" timestamptz null, constraint "token_pkey" primary key ("name"));`);
|
||||
this.addSql(`create index "token_user_id_index" on "token" ("user_id");`);
|
||||
|
||||
this.addSql(`alter table "token" add constraint "token_user_id_foreign" foreign key ("user_id") references "user" ("id") on update cascade;`);
|
||||
|
||||
this.addSql(`alter table "config" alter column "value" type text using ("value"::text);`);
|
||||
|
||||
this.addSql(`alter table "user" drop constraint "user_pkey";`);
|
||||
|
||||
this.addSql(`alter table "user" add column "id" varchar(10) not null, add column "profile" varchar(4096) not null default '', add column "is_owner" boolean not null default false, add column "is_suspended" boolean not null default false, add column "created_at" timestamptz not null, add column "last_used_at" timestamptz null;`);
|
||||
this.addSql(`alter table "user" alter column "email" type varchar(256) using ("email"::varchar(256));`);
|
||||
this.addSql(`alter table "user" alter column "password" type text using ("password"::text);`);
|
||||
this.addSql(`alter table "user" add constraint "user_userid_unique" unique ("userid");`);
|
||||
this.addSql(`alter table "user" add constraint "user_pkey" primary key ("id");`);
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(`drop table if exists "token" cascade;`);
|
||||
|
||||
this.addSql(`alter table "config" alter column "value" type varchar(255) using ("value"::varchar(255));`);
|
||||
|
||||
this.addSql(`alter table "user" drop constraint "user_userid_unique";`);
|
||||
this.addSql(`alter table "user" drop constraint "user_pkey";`);
|
||||
this.addSql(`alter table "user" drop column "id", drop column "profile", drop column "is_owner", drop column "is_suspended", drop column "created_at", drop column "last_used_at";`);
|
||||
|
||||
this.addSql(`alter table "user" alter column "email" type varchar(254) using ("email"::varchar(254));`);
|
||||
this.addSql(`alter table "user" alter column "password" type varchar(60) using ("password"::varchar(60));`);
|
||||
this.addSql(`alter table "user" add constraint "user_pkey" primary key ("userid");`);
|
||||
}
|
||||
|
||||
}
|
||||
+12
-26
@@ -1,8 +1,17 @@
|
||||
import { Migration } from '@mikro-orm/migrations';
|
||||
|
||||
export class Migration20260602125825 extends Migration {
|
||||
export class Migration20260603015108 extends Migration {
|
||||
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(`create table "config" ("name" varchar(255) not null, "value" varchar(4096) not null, constraint "config_pkey" primary key ("name"));`);
|
||||
|
||||
this.addSql(`create table "user" ("id" varchar(10) not null, "userid" varchar(20) not null, "username" varchar(30) not null, "icon" varchar(255) null, "profile" varchar(4096) not null default '', "email" varchar(256) not null, "password" text not null, "is_admin" boolean not null default false, "is_suspended" boolean not null default false, "created_at" timestamptz not null, "last_used_at" timestamptz null, constraint "user_pkey" primary key ("id"));`);
|
||||
this.addSql(`alter table "user" add constraint "user_userid_unique" unique ("userid");`);
|
||||
this.addSql(`alter table "user" add constraint "user_email_unique" unique ("email");`);
|
||||
|
||||
this.addSql(`create table "token" ("name" varchar(64) not null, "passphrase" text not null, "user_id" varchar(10) not null, "is_native" boolean not null, "created_at" timestamptz not null, "last_used_at" timestamptz null, constraint "token_pkey" primary key ("name"));`);
|
||||
this.addSql(`create index "token_user_id_index" on "token" ("user_id");`);
|
||||
|
||||
this.addSql(`create table "log" ("id" varchar(10) not null, "text" varchar(4096) not null, "created_by_id" varchar(10) null, "created_at" timestamptz not null, constraint "log_pkey" primary key ("id"));`);
|
||||
|
||||
this.addSql(`create table "community" ("id" varchar(10) not null, "name" varchar(20) not null, "description" varchar(4096) not null, "icon" varchar(255) null, "created_by_id" varchar(10) not null, "created_at" timestamptz not null, constraint "community_pkey" primary key ("id"));`);
|
||||
@@ -15,6 +24,8 @@ export class Migration20260602125825 extends Migration {
|
||||
|
||||
this.addSql(`create table "message" ("id" varchar(10) not null, "message" varchar(4096) not null, "channel_id" varchar(10) not null, "created_by_id" varchar(10) not null, "created_at" timestamptz not null, constraint "message_pkey" primary key ("id"));`);
|
||||
|
||||
this.addSql(`alter table "token" add constraint "token_user_id_foreign" foreign key ("user_id") references "user" ("id") on update cascade;`);
|
||||
|
||||
this.addSql(`alter table "log" add constraint "log_created_by_id_foreign" foreign key ("created_by_id") references "user" ("id") on update cascade on delete set null;`);
|
||||
|
||||
this.addSql(`alter table "community" add constraint "community_created_by_id_foreign" foreign key ("created_by_id") references "user" ("id") on update cascade;`);
|
||||
@@ -24,31 +35,6 @@ export class Migration20260602125825 extends Migration {
|
||||
|
||||
this.addSql(`alter table "message" add constraint "message_channel_id_foreign" foreign key ("channel_id") references "channel" ("id") on update cascade;`);
|
||||
this.addSql(`alter table "message" add constraint "message_created_by_id_foreign" foreign key ("created_by_id") references "user" ("id") on update cascade;`);
|
||||
|
||||
this.addSql(`alter table "config" alter column "value" type varchar(4096) using ("value"::varchar(4096));`);
|
||||
|
||||
this.addSql(`alter table "user" add column "icon" varchar(255) null;`);
|
||||
this.addSql(`alter table "user" rename column "is_owner" to "is_admin";`);
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(`alter table "channel" drop constraint "channel_community_id_foreign";`);
|
||||
|
||||
this.addSql(`alter table "message" drop constraint "message_channel_id_foreign";`);
|
||||
|
||||
this.addSql(`drop table if exists "log" cascade;`);
|
||||
|
||||
this.addSql(`drop table if exists "community" cascade;`);
|
||||
|
||||
this.addSql(`drop table if exists "channel" cascade;`);
|
||||
|
||||
this.addSql(`drop table if exists "message" cascade;`);
|
||||
|
||||
this.addSql(`alter table "config" alter column "value" type text using ("value"::text);`);
|
||||
|
||||
this.addSql(`alter table "user" drop column "icon";`);
|
||||
|
||||
this.addSql(`alter table "user" rename column "is_admin" to "is_owner";`);
|
||||
}
|
||||
|
||||
}
|
||||
Generated
+1343
-1293
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ minimumReleaseAgeExclude:
|
||||
- pnpm@10.29.1
|
||||
- esbuild
|
||||
- vite
|
||||
- tinyglobby
|
||||
- rolldown
|
||||
- fastify
|
||||
- pnpm
|
||||
|
||||
Reference in New Issue
Block a user