Add chainquery dependencies for Spee.ch, does not include migrations #593

Merged
skhameneh merged 15 commits from add-chainquery into master 2018-10-10 02:12:18 +02:00
49 changed files with 10772 additions and 202 deletions
Showing only changes of commit c9fdc9c3cf - Show all commits

1
.gitignore vendored
View file

@ -5,6 +5,7 @@
node_modules node_modules
client/build client/build
server/chainquery/build
client_custom/build client_custom/build
client_custom/scss client_custom/scss

View file

@ -7,7 +7,7 @@ import { selectSiteHost } from '../selectors/site';
function * retrieveFile (action) { function * retrieveFile (action) {
const name = action.data.name; const name = action.data.name;
const claimId = action.data.claimId; const claimId = action.data.claim_id || action.data.claimId;
const host = yield select(selectSiteHost); const host = yield select(selectSiteHost);
// see if the file is available // see if the file is available
let isAvailable; let isAvailable;

19
package-lock.json generated
View file

@ -908,6 +908,12 @@
"integrity": "sha512-EIjmpvnHj+T4nMcKwHwxZKUfDmphIKJc2qnEMhSoOvr1lYEQpuRKRz8orWr//krYIIArS/KGGLfL2YGVUYXmIA==", "integrity": "sha512-EIjmpvnHj+T4nMcKwHwxZKUfDmphIKJc2qnEMhSoOvr1lYEQpuRKRz8orWr//krYIIArS/KGGLfL2YGVUYXmIA==",
"dev": true "dev": true
}, },
"@types/estree": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
"dev": true
},
"@types/geojson": { "@types/geojson": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-1.0.6.tgz",
@ -12030,6 +12036,16 @@
"inherits": "2.0.3" "inherits": "2.0.3"
} }
}, },
"rollup": {
"version": "0.66.2",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-0.66.2.tgz",
"integrity": "sha512-+rOLjWO170M3Y2jyyGU4ZJuTu1T1KuKNyH+RszHRzQdsuI5TulRbkSM4vlaMnwcxHm4XdgBNZ1mmNzhQIImbiQ==",
"dev": true,
"requires": {
"@types/estree": "0.0.39",
"@types/node": "10.9.4"
}
},
"run-async": { "run-async": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
@ -14152,6 +14168,9 @@
} }
} }
}, },
"winston-slack-webhook": {
"version": "github:billbitt/winston-slack-webhook#ce99792bdf6473a9da69c91772eb4ecec4979b6c"
},
"wkx": { "wkx": {
"version": "0.4.5", "version": "0.4.5",
"resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.5.tgz", "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.5.tgz",

View file

@ -15,8 +15,10 @@
"prestart": "builder run bundle", "prestart": "builder run bundle",
"start": "node server.js", "start": "node server.js",
"start:build": "builder run start", "start:build": "builder run start",
"chainquery:build": "rollup ./server/chainquery/index.js --file ./server/chainquery/bundle.js --format cjs",
"devtools:server": "ndb server.js", "devtools:server": "ndb server.js",
"devtools:chainquery": "ndb ./server/chainquery/index.debug.js", "devtools:chainquery": "npm run devtools:chainquery:build && ndb ./server/chainquery/bundle.debug.js",
"devtools:chainquery:build": "rollup ./server/chainquery/index.debug.js --file ./server/chainquery/bundle.debug.js --format cjs",
"test": "mocha --recursive", "test": "mocha --recursive",
"test:no-lbc": "npm test -- --grep @usesLbc --invert", "test:no-lbc": "npm test -- --grep @usesLbc --invert",
"test:server": "mocha --recursive './server/**/*.test.js'", "test:server": "mocha --recursive './server/**/*.test.js'",
@ -115,6 +117,7 @@
"nodemon": "^1.17.5", "nodemon": "^1.17.5",
"redux-devtools": "^3.4.1", "redux-devtools": "^3.4.1",
"regenerator-transform": "^0.13.0", "regenerator-transform": "^0.13.0",
"rollup": "^0.66.2",
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"sequelize-cli": "^4.0.0", "sequelize-cli": "^4.0.0",
"style-loader": "^0.21.0", "style-loader": "^0.21.0",

File diff suppressed because it is too large Load diff

1075
server/chainquery/bundle.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,6 @@
console.log('Loading `chainquery`, please wait...') console.log('Loading `chainquery`, please wait...')
require('@babel/polyfill'); import chainquery from './index'
require('@babel/register');
const chainquery = require('./');
global.chainquery = chainquery.default ? chainquery.default : chainquery; global.chainquery = chainquery.default ? chainquery.default : chainquery;

View file

@ -3,17 +3,63 @@ const logger = require('winston');
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import abnormalClaimTable from './tables/abnormalClaimTable'; import abnormalClaimTable from './tables/abnormalClaimTable';
tiger5226 commented 2018-09-05 01:23:23 +02:00 (Migrated from github.com)
Review

Is this useful to you? This is for claims that were not made through the app. Claims that are not structured according to the lbry protocol.

Is this useful to you? This is for claims that were not made through the app. Claims that are not structured according to the lbry protocol.
skhameneh commented 2018-10-09 20:11:58 +02:00 (Migrated from github.com)
Review

Not at the moment, retained for full functionality if this is to be split out into a separate lib

Not at the moment, retained for full functionality if this is to be split out into a separate lib
import addressTable from './tables/addressTable'; import addressTable from './tables/addressTable';
import applicationStatusTable from './tables/applicationStatusTable';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import blockTable from './tables/blockTable'; import blockTable from './tables/blockTable';
import claimTable from './tables/claimTable'; import claimTable from './tables/claimTable';
import gorpMigrationsTable from './tables/gorpMigrationsTable';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import inputTable from './tables/inputTable'; import inputTable from './tables/inputTable';
import jobStatusTable from './tables/jobStatusTable';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import outputTable from './tables/outputTable'; import outputTable from './tables/outputTable';
import supportTable from './tables/supportTable'; import supportTable from './tables/supportTable';
import transactionAddressTable from './tables/transactionAddressTable'; import transactionAddressTable from './tables/transactionAddressTable';
import transactionTable from './tables/transactionTable'; import transactionTable from './tables/transactionTable';
import abnormalClaimQueries from './queries/abnormalClaimQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import addressQueries from './queries/addressQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import blockQueries from './queries/blockQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import claimQueries from './queries/claimQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import inputQueries from './queries/inputQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import outputQueries from './queries/outputQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import supportQueries from './queries/supportQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import transactionAddressQueries from './queries/transactionAddressQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
import transactionQueries from './queries/transactionQueries';
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
const DATABASE_STRUCTURE = {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'abnormal_claim': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: abnormalClaimTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: abnormalClaimQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'address': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: addressTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: addressQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'block': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: blockTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: blockQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'claim': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: claimTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: claimQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'input': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: inputTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: inputQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'output': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: outputTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: outputQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'support': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: supportTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: supportQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'transaction_address': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: transactionAddressTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: transactionAddressQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
'transaction': {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
table: transactionTable,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
queries: transactionQueries,
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
},
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
};
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
const { const {
host, host,
port, port,
@ -45,22 +91,19 @@ const sequelize = new Sequelize(database, username, password, {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
}); });
const db = {}; const db = {};
db.abnormal_claim = sequelize.import('abnormal_claim', abnormalClaimTable.createModel); const DATABASE_STRUCTURE_KEYS = Object.keys(DATABASE_STRUCTURE);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.application_status = sequelize.import('application_status', applicationStatusTable.createModel);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.address = sequelize.import('address', addressTable.createModel); for(let i = 0; i < DATABASE_STRUCTURE_KEYS.length; i++) {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.block = sequelize.import('block', blockTable.createModel); let dbKey = DATABASE_STRUCTURE_KEYS[i];
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.claim = sequelize.import('claim', claimTable.createModel); let currentData = DATABASE_STRUCTURE[dbKey];
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.gorp_migrations = sequelize.import('gorp_migrations', gorpMigrationsTable.createModel);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.input = sequelize.import('input', inputTable.createModel); db[dbKey] = currentData.table.createModel(sequelize, Sequelize);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.job_status = sequelize.import('job_status', jobStatusTable.createModel); db[dbKey].queries = currentData.queries(db, db[dbKey]);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.output = sequelize.import('output', outputTable.createModel); }
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.support = sequelize.import('support', supportTable.createModel);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.transaction_address = sequelize.import('transaction_address', transactionAddressTable.createModel);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
db.transaction = sequelize.import('transaction', transactionTable.createModel);
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
// run model.association for each model in the db object that has an association // run model.association for each model in the db object that has an association
logger.info('associating chainquery db models...'); logger.info('associating chainquery db models...');
Object.keys(db).forEach(modelName => { DATABASE_STRUCTURE_KEYS.forEach(modelName => {
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
if (db[modelName].associate) { if (db[modelName].associate) {
logger.info('Associating chainquery model:', modelName); logger.info('Associating chainquery model:', modelName);
db[modelName].associate(db); db[modelName].associate(db);

tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.
tiger5226 commented 2018-09-05 01:22:02 +02:00 (Migrated from github.com)
Review

this is only used for database migrations. Not of use to speech. I would ignore this table.

this is only used for database migrations. Not of use to speech. I would ignore this table.
tiger5226 commented 2018-09-05 01:22:43 +02:00 (Migrated from github.com)
Review

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.

This table is used for tracking background job statuses internal to chainquery. Most likely not useful for speech.
tiger5226 commented 2018-09-05 01:23:52 +02:00 (Migrated from github.com)
Review

same thing. this is an internal table of no importance to speech.

same thing. this is an internal table of no importance to speech.

View file

@ -59,7 +59,7 @@ export default (sequelize, {
tiger5226 commented 2018-09-05 01:25:52 +02:00 (Migrated from github.com)
Review

These are timestamps, is it ok to create it as an integer?

These are timestamps, is it ok to create it as an integer?
skhameneh commented 2018-09-05 02:36:40 +02:00 (Migrated from github.com)
Review

This will work for now, I need to verify that Sequelize.DATE(6) is fully compatible first.
There's a few things like INT(1) that I'm using INTEGER for as well that could probably be switched to Sequelize.BOOLEAN. I know there's a number of BIGINT as well that I need to adjust.

This will work for now, I need to verify that `Sequelize.DATE(6)` is fully compatible first. There's a few things like `INT(1)` that I'm using `INTEGER` for as well that could probably be switched to `Sequelize.BOOLEAN`. I know there's a number of `BIGINT` as well that I need to adjust.
tiger5226 commented 2018-09-05 01:25:52 +02:00 (Migrated from github.com)
Review

These are timestamps, is it ok to create it as an integer?

These are timestamps, is it ok to create it as an integer?
skhameneh commented 2018-09-05 02:36:40 +02:00 (Migrated from github.com)
Review

This will work for now, I need to verify that Sequelize.DATE(6) is fully compatible first.
There's a few things like INT(1) that I'm using INTEGER for as well that could probably be switched to Sequelize.BOOLEAN. I know there's a number of BIGINT as well that I need to adjust.

This will work for now, I need to verify that `Sequelize.DATE(6)` is fully compatible first. There's a few things like `INT(1)` that I'm using `INTEGER` for as well that could probably be switched to `Sequelize.BOOLEAN`. I know there's a number of `BIGINT` as well that I need to adjust.
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
tiger5226 commented 2018-09-05 01:25:52 +02:00 (Migrated from github.com)
Review

These are timestamps, is it ok to create it as an integer?

These are timestamps, is it ok to create it as an integer?
skhameneh commented 2018-09-05 02:36:40 +02:00 (Migrated from github.com)
Review

This will work for now, I need to verify that Sequelize.DATE(6) is fully compatible first.
There's a few things like INT(1) that I'm using INTEGER for as well that could probably be switched to Sequelize.BOOLEAN. I know there's a number of BIGINT as well that I need to adjust.

This will work for now, I need to verify that `Sequelize.DATE(6)` is fully compatible first. There's a few things like `INT(1)` that I'm using `INTEGER` for as well that could probably be switched to `Sequelize.BOOLEAN`. I know there's a number of `BIGINT` as well that I need to adjust.
tiger5226 commented 2018-09-05 01:25:52 +02:00 (Migrated from github.com)
Review

These are timestamps, is it ok to create it as an integer?

These are timestamps, is it ok to create it as an integer?
skhameneh commented 2018-09-05 02:36:40 +02:00 (Migrated from github.com)
Review

This will work for now, I need to verify that Sequelize.DATE(6) is fully compatible first.
There's a few things like INT(1) that I'm using INTEGER for as well that could probably be switched to Sequelize.BOOLEAN. I know there's a number of BIGINT as well that I need to adjust.

This will work for now, I need to verify that `Sequelize.DATE(6)` is fully compatible first. There's a few things like `INT(1)` that I'm using `INTEGER` for as well that could probably be switched to `Sequelize.BOOLEAN`. I know there's a number of `BIGINT` as well that I need to adjust.
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

tiger5226 commented 2018-09-05 01:25:52 +02:00 (Migrated from github.com)
Review

These are timestamps, is it ok to create it as an integer?

These are timestamps, is it ok to create it as an integer?
skhameneh commented 2018-09-05 02:36:40 +02:00 (Migrated from github.com)
Review

This will work for now, I need to verify that Sequelize.DATE(6) is fully compatible first.
There's a few things like INT(1) that I'm using INTEGER for as well that could probably be switched to Sequelize.BOOLEAN. I know there's a number of BIGINT as well that I need to adjust.

This will work for now, I need to verify that `Sequelize.DATE(6)` is fully compatible first. There's a few things like `INT(1)` that I'm using `INTEGER` for as well that could probably be switched to `Sequelize.BOOLEAN`. I know there's a number of `BIGINT` as well that I need to adjust.
tiger5226 commented 2018-09-05 01:25:52 +02:00 (Migrated from github.com)
Review

These are timestamps, is it ok to create it as an integer?

These are timestamps, is it ok to create it as an integer?
skhameneh commented 2018-09-05 02:36:40 +02:00 (Migrated from github.com)
Review

This will work for now, I need to verify that Sequelize.DATE(6) is fully compatible first.
There's a few things like INT(1) that I'm using INTEGER for as well that could probably be switched to Sequelize.BOOLEAN. I know there's a number of BIGINT as well that I need to adjust.

This will work for now, I need to verify that `Sequelize.DATE(6)` is fully compatible first. There's a few things like `INT(1)` that I'm using `INTEGER` for as well that could probably be switched to `Sequelize.BOOLEAN`. I know there's a number of `BIGINT` as well that I need to adjust.

View file

@ -31,7 +31,7 @@ export default (sequelize, {
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

View file

@ -1,33 +0,0 @@
const getterMethods = {
// Add as needed, prefix all methods with `generated`
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
}) => sequelize.define(
'application_status',
{
id: {
primaryKey: true,
type: INTEGER,
set() { },
},
app_version: {
type: INTEGER,
set() { },
},
data_version: {
type: INTEGER,
set() { },
},
api_version: {
type: INTEGER,
set() { },
},
},
{
freezeTableName: true,
getterMethods,
timestamps: false, // don't use default timestamps columns
}
);

View file

@ -91,7 +91,7 @@ export default (sequelize, {
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

View file

@ -3,7 +3,7 @@ const logger = require('winston');
tiger5226 commented 2018-09-05 01:28:59 +02:00 (Migrated from github.com)
Review

This is a boolean that is a TINYINT(1) in the database.

This is a boolean that is a `TINYINT(1)` in the database.
tiger5226 commented 2018-09-05 01:29:58 +02:00 (Migrated from github.com)
Review

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? Active,Expired,Controlling,Spent,Accepted are the enumerations.

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? `Active,Expired,Controlling,Spent,Accepted` are the enumerations.
tiger5226 commented 2018-09-05 01:28:59 +02:00 (Migrated from github.com)
Review

This is a boolean that is a TINYINT(1) in the database.

This is a boolean that is a `TINYINT(1)` in the database.
tiger5226 commented 2018-09-05 01:29:58 +02:00 (Migrated from github.com)
Review

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? Active,Expired,Controlling,Spent,Accepted are the enumerations.

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? `Active,Expired,Controlling,Spent,Accepted` are the enumerations.
const { const {
assetDefaults: { thumbnail: defaultThumbnail }, assetDefaults: { thumbnail: defaultThumbnail },
details: { host } details: { host }
} = require('../../../config/siteConfig'); // TODO: Change back to '@config/siteConfig' when done testing } = require('../../config/siteConfig'); // TODO: Fix paths for rollup
tiger5226 commented 2018-09-05 01:28:59 +02:00 (Migrated from github.com)
Review

This is a boolean that is a TINYINT(1) in the database.

This is a boolean that is a `TINYINT(1)` in the database.
tiger5226 commented 2018-09-05 01:29:58 +02:00 (Migrated from github.com)
Review

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? Active,Expired,Controlling,Spent,Accepted are the enumerations.

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? `Active,Expired,Controlling,Spent,Accepted` are the enumerations.
tiger5226 commented 2018-09-05 01:28:59 +02:00 (Migrated from github.com)
Review

This is a boolean that is a TINYINT(1) in the database.

This is a boolean that is a `TINYINT(1)` in the database.
tiger5226 commented 2018-09-05 01:29:58 +02:00 (Migrated from github.com)
Review

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? Active,Expired,Controlling,Spent,Accepted are the enumerations.

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? `Active,Expired,Controlling,Spent,Accepted` are the enumerations.
const getterMethods = { const getterMethods = {
generated_extension() { generated_extension() {

tiger5226 commented 2018-09-05 01:28:59 +02:00 (Migrated from github.com)
Review

This is a boolean that is a TINYINT(1) in the database.

This is a boolean that is a `TINYINT(1)` in the database.
tiger5226 commented 2018-09-05 01:29:58 +02:00 (Migrated from github.com)
Review

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? Active,Expired,Controlling,Spent,Accepted are the enumerations.

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? `Active,Expired,Controlling,Spent,Accepted` are the enumerations.
tiger5226 commented 2018-09-05 01:28:59 +02:00 (Migrated from github.com)
Review

This is a boolean that is a TINYINT(1) in the database.

This is a boolean that is a `TINYINT(1)` in the database.
tiger5226 commented 2018-09-05 01:29:58 +02:00 (Migrated from github.com)
Review

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? Active,Expired,Controlling,Spent,Accepted are the enumerations.

This is also an enumeration. I see that you set an enumeration above. Should this be listed as well? `Active,Expired,Controlling,Spent,Accepted` are the enumerations.

View file

@ -1,25 +0,0 @@
const getterMethods = {
// Add as needed, prefix all methods with `generated`
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
}) => sequelize.define(
'gorp_migrations',
{
id: {
primaryKey: true,
type: INTEGER,
set() { },
},
applied_at: {
type: INTEGER,
set() { },
},
},
{
freezeTableName: true,
getterMethods,
timestamps: false, // don't use default timestamps columns
}
);

View file

@ -71,7 +71,7 @@ export default (sequelize, {
tiger5226 commented 2018-09-05 01:30:22 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:30:46 +02:00 (Migrated from github.com)
Review

this is unsigned. Does it matter that you treat it as just an integer?

this is unsigned. Does it matter that you treat it as just an integer?
skhameneh commented 2018-09-05 02:42:19 +02:00 (Migrated from github.com)
Review

Ha, alright! I didn't realize TINYINT(1) is exactly the same as BOOL
https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html

BOOL, BOOLEAN
These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true

Ha, alright! I didn't realize `TINYINT(1)` is exactly the same as `BOOL` https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html > **BOOL, BOOLEAN** > These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true
tiger5226 commented 2018-09-05 01:30:22 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:30:46 +02:00 (Migrated from github.com)
Review

this is unsigned. Does it matter that you treat it as just an integer?

this is unsigned. Does it matter that you treat it as just an integer?
skhameneh commented 2018-09-05 02:42:19 +02:00 (Migrated from github.com)
Review

Ha, alright! I didn't realize TINYINT(1) is exactly the same as BOOL
https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html

BOOL, BOOLEAN
These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true

Ha, alright! I didn't realize `TINYINT(1)` is exactly the same as `BOOL` https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html > **BOOL, BOOLEAN** > These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
tiger5226 commented 2018-09-05 01:30:22 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:30:46 +02:00 (Migrated from github.com)
Review

this is unsigned. Does it matter that you treat it as just an integer?

this is unsigned. Does it matter that you treat it as just an integer?
skhameneh commented 2018-09-05 02:42:19 +02:00 (Migrated from github.com)
Review

Ha, alright! I didn't realize TINYINT(1) is exactly the same as BOOL
https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html

BOOL, BOOLEAN
These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true

Ha, alright! I didn't realize `TINYINT(1)` is exactly the same as `BOOL` https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html > **BOOL, BOOLEAN** > These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true
tiger5226 commented 2018-09-05 01:30:22 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:30:46 +02:00 (Migrated from github.com)
Review

this is unsigned. Does it matter that you treat it as just an integer?

this is unsigned. Does it matter that you treat it as just an integer?
skhameneh commented 2018-09-05 02:42:19 +02:00 (Migrated from github.com)
Review

Ha, alright! I didn't realize TINYINT(1) is exactly the same as BOOL
https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html

BOOL, BOOLEAN
These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true

Ha, alright! I didn't realize `TINYINT(1)` is exactly the same as `BOOL` https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html > **BOOL, BOOLEAN** > These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

tiger5226 commented 2018-09-05 01:30:22 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:30:46 +02:00 (Migrated from github.com)
Review

this is unsigned. Does it matter that you treat it as just an integer?

this is unsigned. Does it matter that you treat it as just an integer?
skhameneh commented 2018-09-05 02:42:19 +02:00 (Migrated from github.com)
Review

Ha, alright! I didn't realize TINYINT(1) is exactly the same as BOOL
https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html

BOOL, BOOLEAN
These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true

Ha, alright! I didn't realize `TINYINT(1)` is exactly the same as `BOOL` https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html > **BOOL, BOOLEAN** > These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true
tiger5226 commented 2018-09-05 01:30:22 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:30:46 +02:00 (Migrated from github.com)
Review

this is unsigned. Does it matter that you treat it as just an integer?

this is unsigned. Does it matter that you treat it as just an integer?
skhameneh commented 2018-09-05 02:42:19 +02:00 (Migrated from github.com)
Review

Ha, alright! I didn't realize TINYINT(1) is exactly the same as BOOL
https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html

BOOL, BOOLEAN
These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true

Ha, alright! I didn't realize `TINYINT(1)` is exactly the same as `BOOL` https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html > **BOOL, BOOLEAN** > These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true

View file

@ -1,33 +0,0 @@
const getterMethods = {
// Add as needed, prefix all methods with `generated`
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
}) => sequelize.define(
'job_status',
{
job_name: {
primaryKey: true,
type: STRING,
set() { },
},
last_sync: {
type: INTEGER,
set() { },
},
is_success: {
type: INTEGER,
set() { },
},
error_message: {
type: TEXT,
set() { },
}
},
{
freezeTableName: true,
getterMethods,
timestamps: false, // don't use default timestamps columns
}
);

View file

@ -71,7 +71,7 @@ export default (sequelize, {
tiger5226 commented 2018-09-05 01:33:23 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:33:23 +02:00 (Migrated from github.com)
Review

boolean

boolean
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
tiger5226 commented 2018-09-05 01:33:23 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:33:23 +02:00 (Migrated from github.com)
Review

boolean

boolean
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

tiger5226 commented 2018-09-05 01:33:23 +02:00 (Migrated from github.com)
Review

boolean

boolean
tiger5226 commented 2018-09-05 01:33:23 +02:00 (Migrated from github.com)
Review

boolean

boolean

View file

@ -43,7 +43,7 @@ export default (sequelize, {
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

View file

@ -12,7 +12,7 @@ export default (sequelize, {
type: INTEGER, type: INTEGER,
set() { }, set() { },
}, },
addess_id: { address_id: {
primaryKey: true, primaryKey: true,
type: INTEGER, type: INTEGER,
set() { }, set() { },
@ -28,7 +28,7 @@ export default (sequelize, {
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

View file

@ -67,7 +67,7 @@ export default (sequelize, {
}, },
{ {
freezeTableName: true, freezeTableName: true,
getterMethods, //getterMethods,
timestamps: false, // don't use default timestamps columns timestamps: false, // don't use default timestamps columns
} }
); );

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -0,0 +1,184 @@
const logger = require('winston');
const returnShortId = (claimsArray, longId) => {
tiger5226 commented 2018-09-26 03:39:53 +02:00 (Migrated from github.com)
Review

Is this the canonical url?

Is this the canonical url?
tiger5226 commented 2018-09-26 03:42:43 +02:00 (Migrated from github.com)
Review

If so this doesn't seem right. You want the claim_name included here. Also the claim_id is a hash not based on the height. Ignore if this is not the case. @kauffj has a preference for how we do these shortened URLs.

If so this doesn't seem right. You want the claim_name included here. Also the claim_id is a hash not based on the height. Ignore if this is not the case. @kauffj has a preference for how we do these shortened URLs.
kauffj commented 2018-10-09 20:45:08 +02:00 (Migrated from github.com)
Review

This is the existing logic, I believe. I think there are some issues with it, but we're going to handle it through https://github.com/lbryio/spee.ch/issues/184

This is the existing logic, I believe. I think there are some issues with it, but we're going to handle it through https://github.com/lbryio/spee.ch/issues/184
let claimIndex;
let shortId = longId.substring(0, 1); // default short id is the first letter
let shortIdLength = 0;
// find the index of this claim id
claimIndex = claimsArray.findIndex(element => {
return element.claim_id === longId;
});
if (claimIndex < 0) {
throw new Error('claim id not found in claims list');
}
// get an array of all claims with lower height
let possibleMatches = claimsArray.slice(0, claimIndex);
// remove certificates with the same prefixes until none are left.
while (possibleMatches.length > 0) {
shortIdLength += 1;
shortId = longId.substring(0, shortIdLength);
possibleMatches = possibleMatches.filter(element => {
return (element.claim_id && (element.claim_id.substring(0, shortIdLength) === shortId));
});
}
return shortId;
};
const isLongClaimId = (claimId) => {
return (claimId && (claimId.length === 40));
}
const isShortClaimId = (claimId) => {
return (claimId && (claimId.length < 40));
}
export default (db, table) => ({
getShortClaimIdFromLongClaimId: async (claimId, claimName) => {
logger.debug(`claim.getShortClaimIdFromLongClaimId for ${claimName}#${claimId}`);
return await table.findAll({
where: { name: claimName },
order: [['height', 'ASC']],
}).then(result => {
if(result.length === 0) {
throw new Error('No claim(s) found with that claim name');
}
return returnShortId(result, claimId);
});
},
getAllChannelClaims: async (channelClaimId) => {
logger.debug(`claim.getAllChannelClaims for ${channelClaimId}`);
return await table.findAll({
where: { publisher_id: channelClaimId },
order: [['height', 'DESC']],
raw : true, // returns an array of only data, not an array of instances
})
.then(channelClaimsArray => {
if(channelClaimsArray.length === 0) {
return null;
}
return channelClaimsArray;
})
},
getClaimIdByLongChannelId: async (channelClaimId, claimName) => {
logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`);
tiger5226 commented 2018-09-26 03:45:08 +02:00 (Migrated from github.com)
Review

you will want to select specific pieces of data. Otherwise you will get all of it no? The metadata is also in this table as columns, json, and as hex. You probably only want 1 of these versions for your query.

you will want to select specific pieces of data. Otherwise you will get all of it no? The metadata is also in this table as columns, json, and as hex. You probably only want 1 of these versions for your query.
skhameneh commented 2018-09-26 04:47:30 +02:00 (Migrated from github.com)
Review

Good call

Good call
return await table.findAll({
where: { name: claimName, publisher_id: channelClaimId },
order: [['id', 'ASC']],
})
.then(result => {
switch (result.length) {
case 0:
return null;
case 1:
return result[0].claim_id;
default:
// Does this actually happen??? (from converted code)
logger.warn(`${result.length} records found for "${claimName}" in channel "${channelClaimId}"`);
return result[0].claim_id;
}
});
},
tiger5226 commented 2018-09-26 03:48:29 +02:00 (Migrated from github.com)
Review

any reason for ordering? id doesn't mean much so it may be wasteful to order the results, then again I think this is the default ordering for mysql anyway.

any reason for ordering? `id` doesn't mean much so it may be wasteful to order the results, then again I think this is the default ordering for mysql anyway.
skhameneh commented 2018-09-26 04:48:37 +02:00 (Migrated from github.com)
Review

Retained from the old query, I'll remove.

Retained from the old query, I'll remove.
validateLongClaimId: async (name, claimId) => {
return await table.findOne({
where: {
name,
claim_id: claimId,
},
}).then(result => {
if (!result) {
tiger5226 commented 2018-09-26 03:50:37 +02:00 (Migrated from github.com)
Review

This is a good question actually. Technically, I believe this can happen in the blockchain. In the end every claim has a bid state. So you can always have a claim for a name and you can have 100 of them. Only one can be in the Controlling state though.

This is a good question actually. Technically, I believe this can happen in the blockchain. In the end every claim has a bid state. So you can always have a claim for a name and you can have 100 of them. Only one can be in the `Controlling` state though.
return false;
}
return claimId;
});
},
getLongClaimIdFromShortClaimId: async (name, shortId) => {
return await table.findAll({
where: {
name,
tiger5226 commented 2018-09-26 03:45:40 +02:00 (Migrated from github.com)
Review

why is name here?

why is name here?
skhameneh commented 2018-09-26 04:46:57 +02:00 (Migrated from github.com)
Review

The old code validates against the name as well as the claim ID.
I kept the existing functionality - I might remove this.

The old code validates against the name as well as the claim ID. I kept the existing functionality - I might remove this.
claim_id: {
[sequelize.Op.like]: `${shortId}%`,
}},
order: [['height', 'ASC']],
})
.then(result => {
if(result.length === 0) {
return null;
}
return result[0].claim_id;
});
},
getTopFreeClaimIdByClaimName: async (name) => {
return await table.findAll({
tiger5226 commented 2018-09-26 03:46:53 +02:00 (Migrated from github.com)
Review

This is a very expensive call. Maybe if you really need to use this, I add this feature to Chainquery so it can simply be matched against.

This is a very expensive call. Maybe if you really need to use this, I add this feature to Chainquery so it can simply be matched against.
skhameneh commented 2018-10-09 16:58:43 +02:00 (Migrated from github.com)
Review

It's an old query, these can be adjusted over time

It's an old query, these can be adjusted over time
// TODO: Limit 1
where: { name },
order: [['effective_amount', 'DESC'], ['height', 'ASC']],
}).then(result => {
if(result.length === 0) {
return null;
}
return result[0].claim_id;
})
},
getLongClaimId: async (claimName, claimId) => {
// TODO: Add failure case
logger.debug(`getLongClaimId(${claimName}, ${claimId})`);
if (isLongClaimId(claimId)) {
return table.queries.validateLongClaimId(claimName, claimId);
} else if (isShortClaimId(claimId)) {
tiger5226 commented 2018-09-26 03:52:01 +02:00 (Migrated from github.com)
Review

So not sure we should use this. The bid_state = Controlling is better. This information comes directly from the blockchain.

So not sure we should use this. The `bid_state` = `Controlling` is better. This information comes directly from the blockchain.
return table.queries.getLongClaimIdFromShortClaimId(claimName, claimId);
} else {
return table.queries.getTopFreeClaimIdByClaimName(claimName);
}
},
resolveClaim: async (name, claimId) => {
logger.debug(`Claim.resolveClaim: ${name} ${claimId}`);
return table.findAll({
where: { name, claim_id: claimId },
}).then(claimArray => {
if(claimArray.length === 0) {
return null;
} else if(claimArray.length !== 1) {
logger.warn(`more than one record matches ${name}#${claimId} in db.Claim`);
}
return claimArray[0];
});
},
getOutpoint: async (name, claimId) => {
logger.debug(`finding outpoint for ${name}#${claimId}`);
tiger5226 commented 2018-09-26 03:52:48 +02:00 (Migrated from github.com)
Review

not sure why name is here like this.

not sure why name is here like this.
return await table.findAll({
where : { name, claim_id: claimId },
attributes: ['transaction_hash_id'],
}).then(result => {
if(result.length === 0) {
throw new Error(`no record found for ${name}#${claimId}`);
} else if(result.length !== 1) {
logger.warn(`more than one record matches ${name}#${claimId} in db.Claim`);
}
return result[0].transaction_hash_id;
});
},
getCurrentHeight: async () => {
return await table
tiger5226 commented 2018-09-26 03:54:11 +02:00 (Migrated from github.com)
Review

I think I get it. You are not specifying name because they are identical. However, the claim table is unique on claim_id. So you do not need to ever you both. There is no benefit that I can think of. If there is let me know.

I think I get it. You are not specifying name because they are identical. However, the claim table is unique on `claim_id`. So you do not need to ever you both. There is no benefit that I can think of. If there is let me know.
.max('height')
.then(result => {
return (result || 100000);
});
},
})

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -0,0 +1,3 @@
export default (db, table) => ({
example: () => table.findAll(),
})

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -1,11 +0,0 @@
import ApplicationStatusModel from '../models/ApplicationStatusModel';
export default {
createModel(...args) {
return ApplicationStatusModel(...args);
},
associate(db) {
// associate
}
}

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -1,11 +0,0 @@
import GorpMigrationsModel from '../models/GorpMigrationsModel';
export default {
createModel(...args) {
return GorpMigrationsModel(...args);
},
associate(db) {
// associate
}
}

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -1,11 +0,0 @@
import JobStatusModel from '../models/JobStatusModel';
export default {
createModel(...args) {
return JobStatusModel(...args);
},
associate(db) {
// associate
}
}

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -7,5 +7,5 @@ export default {
associate(db) { associate(db) {
// associate // associate
} },
} }

View file

@ -1,28 +1,15 @@
const db = require('../../../../models'); const db = require('../../../../models');
const chainquery = require('chainquery');
const getClaimData = require('server/utils/getClaimData');
const { returnPaginatedChannelClaims } = require('./channelPagination.js'); const { returnPaginatedChannelClaims } = require('./channelPagination.js');
const getChannelClaims = (channelName, channelClaimId, page) => { const getChannelClaims = async (channelName, channelShortId, page) => {
return new Promise((resolve, reject) => { const channelId = await chainquery.claim.queries.getLongClaimId(channelName, channelShortId);
let longChannelClaimId; const channelClaims = await chainquery.claim.queries.getAllChannelClaims(channelId);
// 1. get the long channel Id (make sure channel exists)
db.Certificate const processedChannelClaims = channelClaims.map((claim) => getClaimData(claim));
.getLongChannelId(channelName, channelClaimId)
.then(result => { return returnPaginatedChannelClaims(channelName, channelId, processedChannelClaims, page);
longChannelClaimId = result;
return db
.Claim
.getAllChannelClaims(longChannelClaimId);
})
.then(channelClaimsArray => {
// 3. format the data for the view, including pagination
let paginatedChannelViewData = returnPaginatedChannelClaims(channelName, longChannelClaimId, channelClaimsArray, page);
// 4. return all the channel information and contents
resolve(paginatedChannelViewData);
})
.catch(error => {
reject(error);
});
});
}; };
module.exports = getChannelClaims; module.exports = getChannelClaims;

View file

@ -1,18 +1,18 @@
const db = require('../../../../models'); const chainquery = require('chainquery');
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('@config/siteConfig'); const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('@config/siteConfig');
const Sequelize = require('sequelize'); const Sequelize = require('sequelize');
const Op = Sequelize.Op; const Op = Sequelize.Op;
const claimAvailability = (name) => { const claimAvailability = async (name) => {
const claimAddresses = additionalClaimAddresses || []; const claimAddresses = additionalClaimAddresses || [];
claimAddresses.push(primaryClaimAddress); claimAddresses.push(primaryClaimAddress);
// find any records where the name is used // find any records where the name is used
return db.Claim return await chainquery.claim
.findAll({ .findAll({
attributes: ['address'], attributes: ['claim_address'],
where : { where : {
name, name,
address: { claim_address: {
[Op.or]: claimAddresses, [Op.or]: claimAddresses,
}, },
}, },

View file

@ -1,4 +1,6 @@
const { handleErrorResponse } = require('../../../utils/errorHandlers.js'); const { handleErrorResponse } = require('../../../utils/errorHandlers.js');
const getClaimData = require('server/utils/getClaimData');
const chainquery = require('chainquery');
const db = require('../../../../models'); const db = require('../../../../models');
/* /*
@ -11,7 +13,14 @@ const claimData = ({ ip, originalUrl, body, params }, res) => {
const claimName = params.claimName; const claimName = params.claimName;
let claimId = params.claimId; let claimId = params.claimId;
if (claimId === 'none') claimId = null; if (claimId === 'none') claimId = null;
db.Claim.resolveClaim(claimName, claimId) chainquery.claim.queries.resolveClaim(claimName, claimId)
.then(claimInfo => {
if (!claimInfo) {
// Not found remote, try local
return db.Claim.resolveClaim(claimName, claimId)
}
return claimInfo
})
.then(claimInfo => { .then(claimInfo => {
if (!claimInfo) { if (!claimInfo) {
return res.status(404).json({ return res.status(404).json({
@ -21,7 +30,7 @@ const claimData = ({ ip, originalUrl, body, params }, res) => {
} }
res.status(200).json({ res.status(200).json({
success: true, success: true,
data : claimInfo, data : getClaimData(claimInfo),
}); });
}) })
.catch(error => { .catch(error => {

View file

@ -1,6 +1,8 @@
const { getClaim } = require('../../../../lbrynet'); const { getClaim } = require('../../../../lbrynet');
const { createFileRecordDataAfterGet } = require('../../../../models/utils/createFileRecordData.js'); const { createFileRecordDataAfterGet } = require('../../../../models/utils/createFileRecordData.js');
const { handleErrorResponse } = require('../../../utils/errorHandlers.js'); const { handleErrorResponse } = require('../../../utils/errorHandlers.js');
const getClaimData = require('server/utils/getClaimData');
const chainquery = require('chainquery');
const db = require('../../../../models'); const db = require('../../../../models');
/* /*
@ -15,21 +17,37 @@ const claimGet = ({ ip, originalUrl, params }, res) => {
let resolveResult; let resolveResult;
let getResult; let getResult;
db.Claim.resolveClaim(name, claimId)
chainquery.claim.queries.resolveClaim(name, claimId)
.then(result => {
if (!result) {
// could not find remote, return false to try local
return false;
}
return resolveResult = result;
})
.then(result => {
if (result === false) {
// Could not find remote, try local
return db.Claim.resolveClaim(name, claimId);
}
return result;
})
.then(result => { .then(result => {
if (!result) { if (!result) {
throw new Error('No matching uri found in Claim table'); throw new Error('No matching uri found in Claim table');
} }
resolveResult = result; return resolveResult = result;
return getClaim(`${name}#${claimId}`);
}) })
.then(result => getClaim(`${name}#${claimId}`))
.then(result => { .then(result => {
if (!result) { if (!result) {
throw new Error(`Unable to Get ${name}#${claimId}`); throw new Error(`Unable to Get ${name}#${claimId}`);
} }
getResult = result; getResult = result;
if (result.completed) { if (result.completed) {
return createFileRecordDataAfterGet(resolveResult, getResult) return createFileRecordDataAfterGet(getClaimData(resolveResult), getResult)
.then(fileData => { .then(fileData => {
const upsertCriteria = {name, claimId}; const upsertCriteria = {name, claimId};
return db.upsert(db.File, fileData, upsertCriteria, 'File'); return db.upsert(db.File, fileData, upsertCriteria, 'File');

View file

@ -1,4 +1,5 @@
const db = require('../../../../models'); const db = require('../../../../models');
const chainquery = require('chainquery');
const { handleErrorResponse } = require('../../../utils/errorHandlers.js'); const { handleErrorResponse } = require('../../../utils/errorHandlers.js');
@ -22,7 +23,13 @@ const claimLongId = ({ ip, originalUrl, body, params }, res) => {
getClaimId(channelName, channelClaimId, claimName, claimId) getClaimId(channelName, channelClaimId, claimName, claimId)
.then(fullClaimId => { .then(fullClaimId => {
claimId = fullClaimId; claimId = fullClaimId;
return chainquery.claim.queries.getOutpoint(claimName, fullClaimId);
})
.then(outpointResult => {
if (!outpointResult) {
return db.Claim.getOutpoint(claimName, fullClaimId); return db.Claim.getOutpoint(claimName, fullClaimId);
}
return outpointResult;
}) })
.then(outpoint => { .then(outpoint => {
return db.Blocked.isNotBlocked(outpoint); return db.Blocked.isNotBlocked(outpoint);

View file

@ -0,0 +1,13 @@
const { details: { host } } = require('@config/siteConfig');
module.exports = (data) => ({
name: data.name,
title: data.title,
contentType: data.content_type || data.contentType,
claimId: data.claim_id || data.claimId,
fileExt: data.generated_extension || data.fileExt,
description: data.description,
thumbnail: data.generated_thumbnail || data.thumbnail,
outpoint: data.transaction_hash_id || data.outpoint,
host,
})

View file

@ -36,9 +36,13 @@ const addAlliasesForSCSS = (aliasObject) => { // scss
module.exports = () => { module.exports = () => {
let moduleAliases = {}; let moduleAliases = {};
moduleAliases['chainquery'] = resolve('./server/chainquery/bundle');
moduleAliases['server'] = resolve('./server');
// aliases for configs // aliases for configs
moduleAliases['@config'] = resolve(`config`); moduleAliases['@config'] = resolve('config');
moduleAliases['@devConfig'] = resolve(`devConfig`); moduleAliases['@devConfig'] = resolve('devConfig');
// create specific aliases for locally defined components in the following folders // create specific aliases for locally defined components in the following folders
moduleAliases = addAliasesForCustomComponentFolder('containers', moduleAliases); moduleAliases = addAliasesForCustomComponentFolder('containers', moduleAliases);

8231
yarn.lock Normal file

File diff suppressed because it is too large Load diff