Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add new columns in schema.sql #469

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/e2e/api.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fetch from 'node-fetch';
import db from '../../src/helpers/mysql';
import proposalInput from '../fixtures/ingestor-payload/proposal.json';
import { spacesSqlFixtures } from '../fixtures/space';
import proposalsFixtures from '../fixtures/proposal';
import db from '../../src/helpers/mysql';
import { spacesSqlFixtures } from '../fixtures/space';

const HOST = `http://localhost:${process.env.PORT || 3003}`;
const SPACE_PREFIX = 'e2e-';
Expand Down Expand Up @@ -71,7 +71,8 @@ describe('POST /flag', () => {
plugins: JSON.stringify(proposal.plugins),
choices: JSON.stringify(proposal.choices),
scores: JSON.stringify(proposal.scores),
scores_by_strategy: JSON.stringify(proposal.scores_by_strategy)
scores_by_strategy: JSON.stringify(proposal.scores_by_strategy),
vp_value_by_strategy: JSON.stringify(proposal.vp_value_by_strategy || [])
}))
.map(async proposal => {
db.queryAsync('INSERT INTO snapshot_sequencer_test.proposals SET ?', proposal);
Expand Down
3 changes: 3 additions & 0 deletions test/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ CREATE TABLE proposals (
scores_state VARCHAR(24) NOT NULL,
scores_total DECIMAL(64,30) NOT NULL,
scores_updated INT(11) NOT NULL,
vp_usd decimal(64,30) NOT NULL DEFAULT '0.000000000000000000000000000000',
vp_eth decimal(64,30) NOT NULL DEFAULT '0.000000000000000000000000000000',
vp_value_by_strategy json NOT NULL,
votes INT(12) NOT NULL,
flagged INT NOT NULL DEFAULT 0,
PRIMARY KEY (id),
Expand Down
Loading