This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
67 additions
and
152 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
62 changes: 0 additions & 62 deletions
62
infra/discovery/migrations/20190410191046-event-drop-table.js
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
'use strict' | ||
|
||
module.exports = (sequelize, DataTypes) => { | ||
// Note: all addresses and hashes are stored in lowercase hexadecimal notation. | ||
const Event = sequelize.define( | ||
'Event', | ||
{ | ||
// Block number at which the event was recorded. | ||
blockNumber: { type: DataTypes.INTEGER, primaryKey: true }, | ||
// Index of the event within the block. | ||
logIndex: { type: DataTypes.INTEGER, primaryKey: true }, | ||
// Address of the contract that emitted the event. | ||
contractAddress: DataTypes.CHAR(42), | ||
// Hash of the transaction that triggered firing the event, | ||
transactionHash: DataTypes.CHAR(66), | ||
// First topic is the signature of the event. | ||
topic0: DataTypes.CHAR(66), | ||
// Next 3 topics are the optional indexed event arguments. | ||
topic1: DataTypes.CHAR(66), | ||
topic2: DataTypes.CHAR(66), | ||
topic3: DataTypes.CHAR(66), | ||
// JSON data for the event as returned by web3 method getPastEvents. | ||
data: DataTypes.JSONB, | ||
// Creation date. | ||
createdAt: DataTypes.DATE | ||
}, | ||
{ | ||
tableName: 'event', | ||
// Do not automatically add the timestamp attributes (updatedAt, createdAt). | ||
timestamps: false | ||
} | ||
) | ||
|
||
Event.associate = function() { | ||
// associations can be defined here | ||
} | ||
|
||
return Event | ||
} |
78 changes: 0 additions & 78 deletions
78
packages/event-cache/migrations/20190410232631-event-create-table.js
This file was deleted.
Oops, something went wrong.
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