-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'docs-ui-additions' of https://github.com/ydkmlt84/Maint…
…ainerr into docs-ui-additions
- Loading branch information
Showing
39 changed files
with
1,291 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: '/' | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: '20:00' | ||
time: "20:00" | ||
open-pull-requests-limit: 10 | ||
ignore: | ||
- dependency-name: "@heroicons/react" | ||
- dependency-name: "chalk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { TypeOrmModuleOptions } from '@nestjs/typeorm'; | ||
|
||
const ormConfig: TypeOrmModuleOptions = { | ||
type: 'sqlite', | ||
logging: false, | ||
database: | ||
process.env.NODE_ENV === 'production' | ||
? '/opt/data/maintainerr.sqlite' | ||
: '../data/maintainerr.sqlite', | ||
subscribers: ['./**/*.subscriber{.ts,.js}'], | ||
migrations: | ||
process.env.NODE_ENV === 'production' | ||
? ['/opt/server/database/migrations/**/*{.js,.ts}'] | ||
: ['./dist/database/migrations/**/*{.js,.ts}'], | ||
autoLoadEntities: true, | ||
migrationsRun: true, | ||
}; | ||
export = ormConfig; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
server/src/database/migrations/1705919105309-Collection_add_info_fields.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class CollectionAddInfoFields1705919105309 | ||
implements MigrationInterface | ||
{ | ||
name = 'CollectionAddInfoFields1705919105309'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
'ALTER TABLE collection ADD COLUMN "addDate" datetime', | ||
); // for postgress: ALTER TABLE collection ADD COLUMN "addDate" timestamp with(out) time zone NOT NULL DEFAULT now() | ||
|
||
await queryRunner.query( | ||
'ALTER TABLE collection ADD COLUMN "handledMediaAmount" INTEGER NOT NULL DEFAULT 0', | ||
); | ||
|
||
await queryRunner.query( | ||
'ALTER TABLE collection ADD COLUMN "lastDurationInSeconds" INTEGER NOT NULL DEFAULT 0', | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE collection DROP "addDate"`); | ||
await queryRunner.query(`ALTER TABLE collection DROP "handledMediaAmount"`); | ||
await queryRunner.query( | ||
`ALTER TABLE collection DROP "lastDurationInSeconds"`, | ||
); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
server/src/database/migrations/1705930583532-Collection_Log_add.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class CollectionLogAdd1705930583532 implements MigrationInterface { | ||
name = 'CollectionLogAdd1705930583532'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(` | ||
CREATE TABLE "collection_log" ( | ||
"id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"collectionId" integer NOT NULL, | ||
"timestamp" datetime NOT NULL, | ||
"message" varchar NOT NULL, | ||
"type" integer NOT NULL | ||
) | ||
`); | ||
await queryRunner.query(` | ||
CREATE INDEX "idx_collection_log_collection_id" ON "collection_log" ("collectionId") | ||
`); | ||
|
||
await queryRunner.query(` | ||
CREATE INDEX "idx_collection_media_collection_id" ON "collection_media" ("collectionId") | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(` | ||
DROP INDEX "idx_collection_log_collection_id" | ||
`); | ||
await queryRunner.query(` | ||
DROP INDEX "idx_collection_media_collection_id" | ||
`); | ||
await queryRunner.query(` | ||
DROP TABLE "collection_log" | ||
`); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
server/src/database/migrations/1706016592389-Collection_add_keep_logs_months.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class CollectionAddKeepLogsMonths1706016592389 | ||
implements MigrationInterface | ||
{ | ||
name = 'CollectionAddKeepLogsMonths1706016592389'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
'ALTER TABLE collection ADD COLUMN "keepLogsForMonths" INTEGER NOT NULL DEFAULT 6', | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE collection DROP "keepLogsForMonths"`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.