import { Blueprint } from './Blueprint'; import { SchemaExpression } from './ColumnDefinition'; import { SchemaBuilder } from './SchemaBuilder'; /** * Static, database-agnostic schema facade — the neorm equivalent of Laravel's * `Schema`. It mirrors the same fluent Blueprint API and dispatches to the * active DataSource, so the very same migration runs on PostgreSQL, MySQL and * SQLite: * * Schema.create('oauth_access_tokens', (table) => { * table.string('id', 100).primary() * table.unsignedBigInteger('userId').index() * table.integer('clientId') * table.text('scopes').nullable() * table.boolean('revoked').default(false) * table.dateTime('expiresAt').nullable() * }) * * Schema.table('oauth_access_tokens', (table) => { * table.foreign('userId').references('id').on('users').onDelete('cascade') * table.dropColumn('scopes') * table.float('weight') * }) * * Schema.drop('legacy_table') * Schema.dropIfExists('temp_table') */ export declare abstract class Schema { /** Targets a specific registered source instead of the active one. */ static connection(sourceName: string): SchemaBuilder; static create(table: string, callback: (table: Blueprint) => void): Promise; static createIfNotExists(table: string, callback: (table: Blueprint) => void): Promise; static table(table: string, callback: (table: Blueprint) => void): Promise; static drop(table: string): Promise; static dropIfExists(table: string): Promise; static rename(from: string, to: string): Promise; static hasTable(table: string): Promise; static hasColumn(table: string, column: string): Promise; /** Wraps a raw SQL fragment for use as a column default. */ static raw(sql: string): SchemaExpression; private static builder; }