09cf474562
-Created a new claimaddress collection to hold claim address data to make it easier to work with and preserve that data if necessary in the future without being cluttered into the address collection -The database init function has been updated to move claim address data to the new collection and remove the data from the address collection. This process will update existing explorer databases automatically and is smart enough to only run this process one time to prevent from slowing down startup of the explorer on each run -The claim name field has been changed from "name" to "claim_name" wherever possible to be easier to find in the future. Searching for the keyword "name" brings back way too many matches and makes it difficult to find all the correct code snippets for future changes -Added a newer_claim_address field to the stats collection to determine if the claim address data needs to be moved to the new collection or not -All previous claim address code has been updated to pull from the new table and/or join to the address table if/when necessary
9 lines
297 B
JavaScript
9 lines
297 B
JavaScript
var mongoose = require('mongoose'),
|
|
Schema = mongoose.Schema;
|
|
|
|
var ClaimAddressSchema = new Schema({
|
|
a_id: {type: String, unique: true, index: true},
|
|
claim_name: {type: String, default: '', index: true}
|
|
}, {id: false});
|
|
|
|
module.exports = mongoose.model('ClaimAddress', ClaimAddressSchema); |