huridocs/uwazi

View on GitHub
app/api/migrations/migrationsModel.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import mongoose from 'mongoose';
import { instanceModel } from 'api/odm';

const entitySchema = new mongoose.Schema({
  delta: Number,
  name: String,
  description: String,
  migrationDate: { type: Date, default: Date.now },
  reindex: Boolean,
});

const Model = instanceModel('migrations', entitySchema);

export default Model;