Files
stacks-blockchain-api/migrations/1589552602432_faucet_requests.js
2023-09-19 10:58:39 +01:00

28 lines
527 B
JavaScript

/** @param { import("node-pg-migrate").MigrationBuilder } pgm */
exports.up = pgm => {
pgm.createTable('faucet_requests', {
id: {
type: 'serial',
primaryKey: true,
},
currency: {
type: 'string',
notNull: true,
},
address: {
type: 'string',
notNull: true,
},
ip: {
type: 'string',
notNull: true,
},
occurred_at: {
type: 'bigint',
notNull: true,
},
});
pgm.createIndex('faucet_requests', 'address', { method: 'hash' });
}