Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
`);

// Only create if it doesn't exist
if (indexes[0].count === 0) {
if (Number(indexes[0].count) === 0) {
await queryInterface.sequelize.query(`
CREATE INDEX idx_tx_output_utxo_lookup
ON tx_output (address, token_id, spent_by, voided, locked, authorities);
Expand All @@ -30,7 +30,7 @@ module.exports = {
AND index_name = 'idx_tx_output_utxo_lookup';
`);

if (indexes[0].count > 0) {
if (Number(indexes[0].count) > 0) {
await queryInterface.sequelize.query(`
DROP INDEX idx_tx_output_utxo_lookup ON tx_output;
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
`);

// Only create if it doesn't exist
if (indexes[0].count === 0) {
if (Number(indexes[0].count) === 0) {
await queryInterface.sequelize.query(`
CREATE INDEX idx_tx_output_locked_heightlock
ON tx_output (locked, heightlock);
Expand All @@ -30,7 +30,7 @@ module.exports = {
AND index_name = 'idx_tx_output_locked_heightlock';
`);

if (indexes[0].count > 0) {
if (Number(indexes[0].count) > 0) {
await queryInterface.sequelize.query(`
DROP INDEX idx_tx_output_locked_heightlock ON tx_output;
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
`);

// Only create if it doesn't exist
if (indexes[0].count === 0) {
if (Number(indexes[0].count) === 0) {
await queryInterface.sequelize.query(`
CREATE INDEX idx_tx_output_locked_timelock
ON tx_output (locked, timelock);
Expand All @@ -30,7 +30,7 @@ module.exports = {
AND index_name = 'idx_tx_output_locked_timelock';
`);

if (indexes[0].count > 0) {
if (Number(indexes[0].count) > 0) {
await queryInterface.sequelize.query(`
DROP INDEX idx_tx_output_locked_timelock ON tx_output;
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
`);

// Only create if it doesn't exist
if (indexes[0].count === 0) {
if (Number(indexes[0].count) === 0) {
await queryInterface.sequelize.query(`
CREATE INDEX idx_address_tx_history_addr_voided_token
ON address_tx_history (address, voided, token_id);
Expand All @@ -30,7 +30,7 @@ module.exports = {
AND index_name = 'idx_address_tx_history_addr_voided_token';
`);

if (indexes[0].count > 0) {
if (Number(indexes[0].count) > 0) {
await queryInterface.sequelize.query(`
DROP INDEX idx_address_tx_history_addr_voided_token ON address_tx_history;
`);
Expand Down
Loading