updated Claim table schema
This commit is contained in:
parent
ddc823aaec
commit
1a169565bd
2 changed files with 28 additions and 31 deletions
|
@ -4,7 +4,6 @@ const logger = require('winston');
|
|||
const getAllFreePublicClaims = require('../helpers/functions/getAllFreePublicClaims.js');
|
||||
const isFreeClaim = require('../helpers/functions/isFreeClaim.js');
|
||||
const serveHelpers = require('../helpers/serveHelpers.js');
|
||||
const { createClaimEntryFromLbryResolve } = require('../helpers/claimModelWrapper.js');
|
||||
|
||||
function checkForLocalAssetByClaimId (claimId, name) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -61,8 +60,6 @@ function getAssetByClaimId (fullClaimId, name) {
|
|||
fileInfo['height'] = resolveResult.claim.height;
|
||||
// insert a record in the File table
|
||||
db.File.create(fileInfo);
|
||||
// insert a record in the Claim table
|
||||
createClaimEntryFromLbryResolve(resolveResult.claim);
|
||||
// resolve the promise
|
||||
resolve(fileInfo);
|
||||
})
|
||||
|
|
|
@ -3,68 +3,68 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, ARRAY, DECIMAL, D
|
|||
'Claim',
|
||||
{
|
||||
address: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
amount: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
claimId: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
claimSequence: {
|
||||
type : INTEGER,
|
||||
allowNull: false,
|
||||
type : INTEGER,
|
||||
default: null,
|
||||
},
|
||||
decodedClaim: {
|
||||
type : BOOLEAN,
|
||||
allowNull: false,
|
||||
type : BOOLEAN,
|
||||
default: null,
|
||||
},
|
||||
depth: {
|
||||
type : INTEGER,
|
||||
allowNull: false,
|
||||
type : INTEGER,
|
||||
default: null,
|
||||
},
|
||||
effectiveAmount: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
hasSignature: {
|
||||
type : BOOLEAN,
|
||||
default: false,
|
||||
default: null,
|
||||
},
|
||||
height: {
|
||||
type : STRING,
|
||||
default: '0',
|
||||
default: null,
|
||||
},
|
||||
hex: {
|
||||
type : TEXT('long'),
|
||||
allowNull: false,
|
||||
type : TEXT('long'),
|
||||
default: null,
|
||||
},
|
||||
name: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
nout: {
|
||||
type : INTEGER,
|
||||
allowNull: false,
|
||||
type : INTEGER,
|
||||
default: null,
|
||||
},
|
||||
txid: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
validAtHeight: {
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
outpoint: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
claimType: {
|
||||
type : STRING,
|
||||
allowNull: false,
|
||||
type : STRING,
|
||||
default: null,
|
||||
},
|
||||
author: {
|
||||
type : STRING,
|
||||
|
|
Loading…
Reference in a new issue