forked from CIT/Vmeda.Online
		
	MOBILE-3320 sites: Fix schema name registration
This commit is contained in:
		
							parent
							
								
									95ebb00703
								
							
						
					
					
						commit
						f2f8ae664d
					
				@ -1087,7 +1087,7 @@ export class SQLiteDB {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export type SQLiteDBRecordValues = {
 | 
			
		||||
    [key in string ]: SQLiteDBRecordValue | undefined | null;
 | 
			
		||||
    [key: string]: SQLiteDBRecordValue | undefined | null;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export type SQLiteDBQueryParams = {
 | 
			
		||||
 | 
			
		||||
@ -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,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
@ -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,
 | 
			
		||||
        },
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
@ -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<CoreSiteSchema[]>('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 });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user