@bsv/overlay
Version:
BSV Blockchain Overlay Services Engine
37 lines • 1.32 kB
JavaScript
export async function up(knex) {
const client = (knex.client.config.client || '').toLowerCase();
if (client.startsWith('mysql')) {
await knex.schema.alterTable('outputs', table => {
table.specificType('outputScript', 'LONGBLOB').alter();
});
}
else if (client === 'sqlite3') {
await knex.schema.alterTable('outputs', table => {
table.binary('outputScript').alter();
});
}
if (client.startsWith('mysql')) {
await knex.schema.alterTable('transactions', table => {
table.specificType('beef', 'LONGBLOB').alter();
});
}
else if (client === 'sqlite3') {
await knex.schema.alterTable('transactions', table => {
table.binary('beef').alter();
});
}
}
export async function down(knex) {
const client = (knex.client.config.client || '').toLowerCase();
if (client.startsWith('mysql') || client === 'sqlite3') {
await knex.schema.alterTable('outputs', table => {
table.binary('outputScript').alter();
});
}
if (client.startsWith('mysql') || client === 'sqlite3') {
await knex.schema.alterTable('transactions', table => {
table.binary('beef').alter();
});
}
}
//# sourceMappingURL=2025-05-28-001-enlarge.js.map