diff --git a/src/core/classes/sqlitedb.ts b/src/core/classes/sqlitedb.ts index 5ee68de65..dda138da6 100644 --- a/src/core/classes/sqlitedb.ts +++ b/src/core/classes/sqlitedb.ts @@ -1087,7 +1087,7 @@ export class SQLiteDB { } export type SQLiteDBRecordValues = { - [key in string ]: SQLiteDBRecordValue | undefined | null; + [key: string]: SQLiteDBRecordValue | undefined | null; }; export type SQLiteDBQueryParams = { diff --git a/src/core/features/h5p/h5p.module.ts b/src/core/features/h5p/h5p.module.ts index 011fd98ad..cc9b809dc 100644 --- a/src/core/features/h5p/h5p.module.ts +++ b/src/core/features/h5p/h5p.module.ts @@ -17,13 +17,7 @@ import { APP_INITIALIZER, NgModule } from '@angular/core'; import { CorePluginFileDelegate } from '@services/plugin-file-delegate'; import { CORE_SITE_SCHEMAS } from '@services/sites'; import { CoreH5PComponentsModule } from './components/components.module'; -import { - CONTENT_TABLE_NAME, - LIBRARIES_TABLE_NAME, - LIBRARY_DEPENDENCIES_TABLE_NAME, - CONTENTS_LIBRARIES_TABLE_NAME, - LIBRARIES_CACHEDASSETS_TABLE_NAME, -} from './services/database/h5p'; +import { SITE_SCHEMA } from './services/database/h5p'; import { CoreH5PPluginFileHandler } from './services/handlers/pluginfile'; @NgModule({ @@ -33,13 +27,7 @@ import { CoreH5PPluginFileHandler } from './services/handlers/pluginfile'; providers: [ { provide: CORE_SITE_SCHEMAS, - useValue: [ - CONTENT_TABLE_NAME, - LIBRARIES_TABLE_NAME, - LIBRARY_DEPENDENCIES_TABLE_NAME, - CONTENTS_LIBRARIES_TABLE_NAME, - LIBRARIES_CACHEDASSETS_TABLE_NAME, - ], + useValue: [SITE_SCHEMA], multi: true, }, { diff --git a/src/core/features/xapi/xapi.module.ts b/src/core/features/xapi/xapi.module.ts index 8671585e0..23f76b909 100644 --- a/src/core/features/xapi/xapi.module.ts +++ b/src/core/features/xapi/xapi.module.ts @@ -15,16 +15,14 @@ import { NgModule } from '@angular/core'; import { CORE_SITE_SCHEMAS } from '@services/sites'; -import { STATEMENTS_TABLE_NAME } from './services/database/xapi'; +import { SITE_SCHEMA } from './services/database/xapi'; @NgModule({ imports: [], providers: [ { provide: CORE_SITE_SCHEMAS, - useValue: [ - STATEMENTS_TABLE_NAME, - ], + useValue: [SITE_SCHEMA], multi: true, }, ], diff --git a/src/core/services/sites.ts b/src/core/services/sites.ts index b28c44c5e..18b68b0a3 100644 --- a/src/core/services/sites.ts +++ b/src/core/services/sites.ts @@ -51,7 +51,7 @@ import { import { CoreArray } from '../singletons/array'; import { CoreNetworkError } from '@classes/errors/network-error'; -export const CORE_SITE_SCHEMAS = new InjectionToken('CORE_SITE_SCHEMAS'); +export const CORE_SITE_SCHEMAS = new InjectionToken('CORE_SITE_SCHEMAS'); /* * Service to manage and interact with sites. @@ -1576,7 +1576,7 @@ export class CoreSitesProvider { } // Set installed version. - await db.insertRecord(SCHEMA_VERSIONS_TABLE_NAME, { name, version: schema.version }); + await db.insertRecord(SCHEMA_VERSIONS_TABLE_NAME, { name: schema.name, version: schema.version }); } /**