![Jev Björsell](/assets/img/avatar_default.png)
When this is merged https://gitlab.com/ligolang/ligo-web-ide/ will be marked as deprecated. This MR does not hook up the webide build to the main CI. The CI integration will come in a subsequent MR for the sake of making review easier.
30 lines
690 B
TypeScript
30 lines
690 B
TypeScript
import joi from '@hapi/joi';
|
|
|
|
import { Migration } from './migration';
|
|
|
|
export interface SchemaV0 {
|
|
code: string;
|
|
language: string;
|
|
entrypoint: string;
|
|
parameters: string;
|
|
storage: string;
|
|
}
|
|
|
|
export class SchemaMigrationV0 extends Migration {
|
|
protected readonly schema = joi.object({
|
|
code: joi.string().required(),
|
|
language: joi.string().required(),
|
|
entrypoint: joi.string().required(),
|
|
parameters: joi.any().required(),
|
|
storage: joi.any().required()
|
|
});
|
|
|
|
protected readonly previous: Migration | null = null;
|
|
|
|
protected migrate(_: any): any {
|
|
throw new Error(
|
|
'Called migrate() on the first migration. Cannot migrate v0 -> v0.'
|
|
);
|
|
}
|
|
}
|