Skip to content

Commit

Permalink
rename stacked_unlocked_events to unlocked_events
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-aurele-besner committed Feb 13, 2025
1 parent 14c6185 commit b5a8c82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions indexers/db/docker-entrypoint-initdb.d/init-db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1515,11 +1515,12 @@ CREATE TABLE staking.runtime_creations (
);
ALTER TABLE staking.runtime_creations OWNER TO postgres;

CREATE TABLE staking.staked_unlocked_events (
CREATE TABLE staking.unlocked_events (
id text NOT NULL,
domain_id text NOT NULL,
operator_id text NOT NULL,
account_id text NOT NULL,
nominator_id text NOT NULL,
amount numeric NOT NULL,
storage_fee numeric NOT NULL,
block_height numeric NOT NULL,
Expand All @@ -1528,7 +1529,7 @@ CREATE TABLE staking.staked_unlocked_events (
_id uuid NOT NULL,
_block_range int8range NOT NULL
);
ALTER TABLE staking.staked_unlocked_events OWNER TO postgres;
ALTER TABLE staking.unlocked_events OWNER TO postgres;

CREATE TABLE staking.withdraw_events (
id text NOT NULL,
Expand Down Expand Up @@ -1940,8 +1941,8 @@ ALTER TABLE ONLY staking.operators
ALTER TABLE ONLY staking.runtime_creations
ADD CONSTRAINT runtime_creations_pkey PRIMARY KEY (_id);

ALTER TABLE ONLY staking.staked_unlocked_events
ADD CONSTRAINT staked_unlocked_events_pkey PRIMARY KEY (_id);
ALTER TABLE ONLY staking.unlocked_events
ADD CONSTRAINT unlocked_events_pkey PRIMARY KEY (_id);

ALTER TABLE ONLY staking.withdraw_events
ADD CONSTRAINT withdraw_events_pkey PRIMARY KEY (_id);
Expand Down Expand Up @@ -2122,7 +2123,7 @@ CREATE INDEX "0xd5509466634aea27" ON files.chunks USING btree (id);
CREATE INDEX "0xd9be8718ef6c7984" ON files.folder_cids USING btree (id);
CREATE INDEX "files_folder_cids_parent_cid" ON files.folder_cids USING btree (parent_cid);

CREATE INDEX "0x095f76af1e0896c7" ON staking.staked_unlocked_events USING btree (id);
CREATE INDEX "0x095f76af1e0896c7" ON staking.unlocked_events USING btree (id);
CREATE INDEX "0x17ee75861ab4beba" ON staking.operator_deregistrations USING btree (id);
CREATE INDEX "0x386761c4d1c44502" ON staking.operator_rewards USING btree (id);
CREATE INDEX "0x3a7ed99d2776ff11" ON staking.operator_tax_collections USING btree (id);
Expand Down Expand Up @@ -3075,6 +3076,6 @@ $$;
ALTER FUNCTION staking.handle_unlocked_events() OWNER TO postgres;

CREATE TRIGGER handle_unlocked_events
AFTER INSERT ON staking.staked_unlocked_events
AFTER INSERT ON staking.unlocked_events
FOR EACH ROW
EXECUTE FUNCTION staking.handle_unlocked_events();
3 changes: 2 additions & 1 deletion indexers/staking/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ type BundleSubmission @entity {
eventId: String!
}

type StakedUnlockedEvent @entity {
type UnlockedEvent @entity {
id: ID!
domainId: String!
operatorId: String!
accountId: String!
nominatorId: String!
amount: BigInt!
storageFee: BigInt!
blockHeight: BigInt!
Expand Down

0 comments on commit b5a8c82

Please sign in to comment.