-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from hirosystems/develop
release into beta
- Loading branch information
Showing
77 changed files
with
4,094 additions
and
6,626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate'; | ||
|
||
export const shorthands: ColumnDefinitions | undefined = undefined; | ||
|
||
export function up(pgm: MigrationBuilder): void { | ||
pgm.createTable('satoshis', { | ||
ordinal_number: { | ||
type: 'numeric', | ||
primaryKey: true, | ||
}, | ||
rarity: { | ||
type: 'text', | ||
notNull: true, | ||
}, | ||
coinbase_height: { | ||
type: 'bigint', | ||
notNull: true, | ||
}, | ||
}); | ||
pgm.createIndex('satoshis', ['rarity']); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate'; | ||
|
||
export const shorthands: ColumnDefinitions | undefined = undefined; | ||
|
||
export function up(pgm: MigrationBuilder): void { | ||
pgm.createTable('inscription_transfers', { | ||
genesis_id: { | ||
type: 'text', | ||
notNull: true, | ||
}, | ||
number: { | ||
type: 'bigint', | ||
notNull: true, | ||
}, | ||
ordinal_number: { | ||
type: 'numeric', | ||
notNull: true, | ||
}, | ||
block_height: { | ||
type: 'bigint', | ||
notNull: true, | ||
}, | ||
tx_index: { | ||
type: 'bigint', | ||
notNull: true, | ||
}, | ||
block_hash: { | ||
type: 'text', | ||
notNull: true, | ||
}, | ||
block_transfer_index: { | ||
type: 'int', | ||
notNull: true, | ||
}, | ||
}); | ||
pgm.createConstraint('inscription_transfers', 'inscription_transfers_pkey', { | ||
primaryKey: ['block_height', 'block_transfer_index'], | ||
}); | ||
pgm.createConstraint( | ||
'inscription_transfers', | ||
'inscription_transfers_locations_fk', | ||
'FOREIGN KEY(ordinal_number, block_height, tx_index) REFERENCES locations(ordinal_number, block_height, tx_index) ON DELETE CASCADE' | ||
); | ||
pgm.createConstraint( | ||
'inscription_transfers', | ||
'inscription_transfers_satoshis_fk', | ||
'FOREIGN KEY(ordinal_number) REFERENCES satoshis(ordinal_number) ON DELETE CASCADE' | ||
); | ||
pgm.createIndex('inscription_transfers', ['genesis_id']); | ||
pgm.createIndex('inscription_transfers', ['number']); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import { MigrationBuilder, ColumnDefinitions } from 'node-pg-migrate'; | ||
|
||
export const shorthands: ColumnDefinitions | undefined = undefined; | ||
|
||
export function up(pgm: MigrationBuilder): void { | ||
pgm.createTable('inscription_recursions', { | ||
genesis_id: { | ||
type: 'text', | ||
notNull: true, | ||
}, | ||
ref_genesis_id: { | ||
type: 'text', | ||
notNull: true, | ||
}, | ||
}); | ||
pgm.createConstraint('inscription_recursions', 'inscription_recursions_pkey', { | ||
primaryKey: ['genesis_id', 'ref_genesis_id'], | ||
}); | ||
pgm.createConstraint( | ||
'inscription_recursions', | ||
'inscription_recursions_genesis_id_fk', | ||
'FOREIGN KEY(genesis_id) REFERENCES inscriptions(genesis_id) ON DELETE CASCADE' | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.