@bsv/overlay
Version:
BSV Blockchain Overlay Services Engine
32 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.up = up;
exports.down = down;
async function up(knex) {
await knex.schema.createTable('outputs', table => {
table.increments();
table.string('txid', 64);
table.integer('outputIndex', 10);
table.binary('outputScript');
table.string('topic');
table.integer('satoshis', 15);
table.binary('beef');
// Represents the outputs that were provided as inputs
// to the transaction that created this output.
// This indicates the correct history of this output.
table.text('outputsConsumed', 'longtext').defaultTo('[]');
// Tracks any outputs the current output is used as an input in it's creation
table.text('consumedBy', 'longtext').defaultTo('[]');
table.boolean('spent').defaultTo(false);
});
await knex.schema.createTable('applied_transactions', table => {
table.increments();
table.string('txid', 64);
table.string('topic');
});
}
async function down(knex) {
await knex.schema.dropTable('applied_transactions');
await knex.schema.dropTable('outputs');
}
//# sourceMappingURL=2024-05-18-001-initial.js.map