Finish chainquery changes (required for metrics/migrations/trending, moving to new PR)

This commit is contained in:
Shawn 2018-10-08 12:14:31 -05:00
parent 158f0b4863
commit 580ca10a8e
10 changed files with 79 additions and 36 deletions

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'abnormal_claim',
{
@ -21,7 +26,7 @@ export default (sequelize, {
set() { },
},
is_update: {
type: INTEGER,
type: BOOLEAN,
set() { },
},
block_hash: {
@ -49,11 +54,11 @@ export default (sequelize, {
set() { },
},
created_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
},

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'address',
{
@ -17,15 +22,15 @@ export default (sequelize, {
set() { },
},
first_seen: {
type: INTEGER,
type: DATE(6),
set() { },
},
created_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
},

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'block',
{
@ -81,11 +86,11 @@ export default (sequelize, {
set() { },
},
created_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
},

View file

@ -35,7 +35,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'claim',
{
@ -121,7 +126,7 @@ export default (sequelize, {
set() { },
},
is_nsfw: {
type: INTEGER,
type: BOOLEAN,
set() { },
},
language: {
@ -145,7 +150,7 @@ export default (sequelize, {
set() { },
},
is_filtered: {
type: INTEGER,
type: BOOLEAN,
set() { },
},
bid_state: {
@ -153,11 +158,11 @@ export default (sequelize, {
set() { },
},
created_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
fee_address: {

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'input',
{
@ -25,7 +30,7 @@ export default (sequelize, {
set() { },
},
is_coinbase: {
type: INTEGER,
type: BOOLEAN,
set() { },
},
coinbase: {
@ -37,7 +42,7 @@ export default (sequelize, {
set() { },
},
prevout_n: {
type: INTEGER,
type: INTEGER.UNSIGNED,
set() { },
},
prevout_spend_updated: {
@ -61,11 +66,11 @@ export default (sequelize, {
set() { },
},
created: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified: {
type: INTEGER,
type: DATE(6),
set() { },
},
},

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'output',
{
@ -49,7 +54,7 @@ export default (sequelize, {
set() { },
},
is_spent: {
type: INTEGER,
type: BOOLEAN,
set() { },
},
spent_by_input_id: {
@ -57,11 +62,11 @@ export default (sequelize, {
set() { },
},
created_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
claim_id: {

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'support',
{
@ -33,11 +38,11 @@ export default (sequelize, {
set() { },
},
created_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
},

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'transaction_address',
{

View file

@ -3,7 +3,12 @@ const getterMethods = {
}
export default (sequelize, {
STRING, BOOLEAN, INTEGER, TEXT, DECIMAL
BOOLEAN,
DATE,
DECIMAL,
INTEGER,
STRING,
TEXT,
}) => sequelize.define(
'transaction',
{
@ -45,7 +50,7 @@ export default (sequelize, {
set() { },
},
lock_time: {
type: INTEGER,
type: DATE(6),
set() { },
},
raw: {
@ -53,15 +58,15 @@ export default (sequelize, {
set() { },
},
created_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
modified_at: {
type: INTEGER,
type: DATE(6),
set() { },
},
created_time: {
type: INTEGER,
type: DATE(6),
set() {},
},
},

View file

@ -88,8 +88,6 @@ module.exports = function (req, res) {
res.send((0, _renderFullPage.default)(helmet, html, preloadedState));
};
console.log(httpContext.get('routePath'), runSaga, httpContext.get('routeData'), action, saga);
if (runSaga) {
// create and apply middleware
var sagaMiddleware = (0, _reduxSaga.default)();