- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim) - AdonisJS v7 app with Inertia.js + Vue 3 - MongoDB integration - CWMP/TR-069 state machine engine - Configuration engine with compliance tracking - Branding: ADAM ACS (favicon, navbar, locales) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
20 lines
639 B
TypeScript
20 lines
639 B
TypeScript
import { MongoMigration } from '../mongo_migrator.js'
|
|
|
|
export default class CreateConfigurationVersionsCollection extends MongoMigration {
|
|
async up(): Promise<void> {
|
|
const collection = this.db.collection('configuration_versions')
|
|
await collection.createIndex(
|
|
{ configurationIdentifier: 1, versionNumber: -1 },
|
|
{ name: 'idx_configuration_identifier_version_number' }
|
|
)
|
|
await collection.createIndex(
|
|
{ configurationIdentifier: 1 },
|
|
{ name: 'idx_configuration_identifier' }
|
|
)
|
|
}
|
|
|
|
async down(): Promise<void> {
|
|
await this.db.dropCollection('configuration_versions').catch(() => {})
|
|
}
|
|
}
|