Skip to content

Commit

Permalink
fix paranet asset repo & model
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksaelezovic committed Jan 10, 2025
1 parent cb3d0dc commit ee5eb89
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ export async function up({ context: { queryInterface, Sequelize } }) {
defaultValue: Sequelize.literal('NOW()'),
},
});
await queryInterface.addConstraint('paranet_asset', {
fields: ['ual', 'paranet_ual'],
type: 'unique',
});
}

export async function down({ context: { queryInterface } }) {
await queryInterface.dropTable('paranet_assets');
await queryInterface.dropTable('paranet_asset');
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import OperationResponseRepository from './repositories/operation-response.js';
import ShardRepository from './repositories/shard-repository.js';
import TokenRepository from './repositories/token-repository.js';
import UserRepository from './repositories/user-repository.js';
import MissedParanetAssetRepository from './repositories/missed-paranet-asset-repository.js';
import ParanetSyncedAssetRepository from './repositories/paranet-synced-asset-repository.js';
// import MissedParanetAssetRepository from './repositories/missed-paranet-asset-repository.js';
// import ParanetSyncedAssetRepository from './repositories/paranet-synced-asset-repository.js';
import FinalityStatusRepository from './repositories/finality-status-repository.js';
import ParanetAssetRepository from './repositories/paranet-asset-repository.js';

const __dirname = fileURLToPath(new URL('.', import.meta.url));

Expand All @@ -38,8 +39,9 @@ class SequelizeRepository {
command: new CommandRepository(this.models),
event: new EventRepository(this.models),
paranet: new ParanetRepository(this.models),
paranet_synced_asset: new ParanetSyncedAssetRepository(this.models),
missed_paranet_asset: new MissedParanetAssetRepository(this.models),
// paranet_synced_asset: new ParanetSyncedAssetRepository(this.models),
// missed_paranet_asset: new MissedParanetAssetRepository(this.models),
paranet_asset: new ParanetAssetRepository(this.models),
operation_id: new OperationIdRepository(this.models),
operation: new OperationRepository(this.models),
operation_response: new OperationResponseRepository(this.models),
Expand Down

0 comments on commit ee5eb89

Please sign in to comment.