fix: possible fix for invalid paths after build for schemas and tx lib

This commit is contained in:
Matthew Little
2020-04-13 16:25:24 +02:00
parent f992e8631f
commit 179dfe279b
21 changed files with 29 additions and 44 deletions

View File

@@ -1,41 +0,0 @@
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate';
export const shorthands: ColumnDefinitions | undefined = undefined;
export async function up(pgm: MigrationBuilder): Promise<void> {
pgm.createTable('blocks', {
block_hash: {
primaryKey: true,
type: 'bytea',
},
block_height: {
type: 'integer',
notNull: true,
},
index_block_hash: {
type: 'bytea',
notNull: true,
},
parent_block_hash: {
type: 'bytea',
notNull: true,
},
parent_microblock: {
type: 'bytea',
notNull: true,
},
canonical: {
type: 'boolean',
notNull: true,
},
});
pgm.createIndex('blocks', 'block_height');
pgm.createIndex('blocks', 'parent_block_hash');
pgm.createIndex('blocks', 'canonical');
}
/*
export async function down(pgm: MigrationBuilder): Promise<void> {
pgm.dropTable('blocks');
}
*/

View File

@@ -1,66 +0,0 @@
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate';
export const shorthands: ColumnDefinitions | undefined = undefined;
export async function up(pgm: MigrationBuilder): Promise<void> {
pgm.createTable('txs', {
tx_id: {
primaryKey: true,
type: 'bytea',
},
tx_index: {
notNull: true,
type: 'smallint',
},
block_hash: {
type: 'bytea',
notNull: true,
},
block_height: {
type: 'integer',
notNull: true,
},
type_id: {
notNull: true,
type: 'smallint',
},
status: {
notNull: true,
type: 'smallint',
},
canonical: {
type: 'boolean',
notNull: true,
},
post_conditions: {
type: 'bytea',
},
fee_rate: {
type: 'bigint',
notNull: true,
},
sponsored: {
type: 'boolean',
notNull: true,
},
sender_address: {
type: 'string',
notNull: true,
},
origin_hash_mode: {
type: 'smallint',
notNull: true,
},
});
pgm.createIndex('txs', 'block_hash');
pgm.createIndex('txs', 'type_id');
pgm.createIndex('txs', 'block_height');
pgm.createIndex('txs', 'canonical');
pgm.createIndex('txs', 'sender_address');
}
/*
export async function down(pgm: MigrationBuilder): Promise<void> {
pgm.dropTable('txs');
}
*/