Skip to content

Commit

Permalink
feat: add support for new source column in statements table (#913)
Browse files Browse the repository at this point in the history
* feat: add support for new source column in statements table

* fix: update source column length to 24
  • Loading branch information
wa0x6e committed Aug 28, 2024
1 parent 45354da commit 5523a48
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 @@ -344,6 +344,8 @@ input StatementsWhere {
created_gte: Int
created_lt: Int
created_lte: Int
source: String
source_in: [String]
}

input LeaderboardsWhere {
Expand Down Expand Up @@ -581,6 +583,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(24) 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 5523a48

Please sign in to comment.