Skip to content

Commit

Permalink
feat: add support for new source column in statements table
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Aug 22, 2024
1 parent c1d9621 commit bf0e843
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/graphql/operations/statements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default async function (parent, args) {
ipfs: 'string',
space: 'string',
network: 'string',
source: 'string',
created: 'number',
delegate: ['evmAddress', 'starknetAddress']
};
Expand Down
3 changes: 3 additions & 0 deletions src/graphql/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ input StatementsWhere {
created_gte: Int
created_lt: Int
created_lte: Int
source: String
source_in: [String]
}

input LeaderboardsWhere {
Expand Down Expand Up @@ -580,6 +582,7 @@ type Statement {
statement: String
discourse: String
status: String
source: String
created: Int!
updated: Int!
}
Expand Down
4 changes: 3 additions & 1 deletion src/helpers/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,14 @@ CREATE TABLE users (

CREATE TABLE statements (
id VARCHAR(66) NOT NULL,
ipfs VARCHAR(64) NOT NULL,
ipfs VARCHAR(64) DEFAULT NULL,
delegate VARCHAR(100) NOT NULL,
space VARCHAR(100) NOT NULL,
about TEXT,
statement TEXT,
network VARCHAR(24) NOT NULL DEFAULT 's',
discourse VARCHAR(64),
source VARCHAR(100) DEFAULT NULL,
status VARCHAR(24) NOT NULL DEFAULT 'INACTIVE',
created INT(11) NOT NULL,
updated INT(11) NOT NULL,
Expand All @@ -164,6 +165,7 @@ CREATE TABLE statements (
INDEX network (network),
INDEX created (created),
INDEX updated (updated),
INDEX source (source),
INDEX status (status)
);

Expand Down

0 comments on commit bf0e843

Please sign in to comment.