- 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>
21 lines
574 B
TypeScript
21 lines
574 B
TypeScript
import { MongoMigration } from '../mongo_migrator.js'
|
|
|
|
export default class CreateCommandsCollection extends MongoMigration {
|
|
async up(): Promise<void> {
|
|
const collection = this.db.collection('commands')
|
|
|
|
await collection.createIndex(
|
|
{ deviceIdentifier: 1 },
|
|
{ background: true, name: 'idx_deviceIdentifier' }
|
|
)
|
|
await collection.createIndex(
|
|
{ status: 1, priority: -1 },
|
|
{ background: true, name: 'idx_status_priority' }
|
|
)
|
|
}
|
|
|
|
async down(): Promise<void> {
|
|
await this.db.dropCollection('commands').catch(() => {})
|
|
}
|
|
}
|