Files
big-brother/api/database/migrations/1770000000005_create_compose_versions_table.ts
T
RutraandClaude Opus 5.5 c106fcfc62 Édition du docker-compose.yml depuis la page d'un conteneur
Vérification par docker compose config avant écriture, application avec
docker compose up -d et retour à la version précédente en cas d'échec.
Historique des versions par fichier. Le Caddyfile et le compose gardent
un retour à la ligne final.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:31:33 +02:00

25 lines
656 B
TypeScript

import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* Previous contents of the docker-compose.yml files, saved before every
* change made from the dashboard.
*/
export default class extends BaseSchema {
protected tableName = 'compose_versions'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id')
table.string('path').notNullable().index()
table.text('content').notNullable()
table.string('username').nullable()
table.string('reason').nullable()
table.timestamp('created_at').notNullable()
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}