14 use Illuminate\Database\Migrations\Migration;
15 use Illuminate\Database\Schema\Builder;
16 use Illuminate\Database\Schema\Blueprint;
17 use Illuminate\Database\Capsule\Manager as Capsule;
24 public function up() {
26 Capsule::schema()->create(
'data_object_tombstones',
function (Blueprint $table) {
27 $table->bigInteger(
'tombstone_id')->autoIncrement();
28 $table->bigInteger(
'data_object_id');
29 $table->datetime(
'date_deleted');
30 $table->string(
'set_spec', 255);
31 $table->string(
'set_name', 255);
32 $table->string(
'oai_identifier', 255);
33 $table->index([
'data_object_id'],
'data_object_tombstones_data_object_id');
37 Capsule::schema()->create(
'data_object_tombstone_settings',
function (Blueprint $table) {
38 $table->bigInteger(
'tombstone_id');
39 $table->string(
'locale', 14)->
default(
'');
40 $table->string(
'setting_name', 255);
41 $table->text(
'setting_value')->nullable();
42 $table->string(
'setting_type', 6)->comment(
'(bool|int|float|string|object)');
43 $table->index([
'tombstone_id'],
'data_object_tombstone_settings_tombstone_id');
44 $table->unique([
'tombstone_id',
'locale',
'setting_name'],
'data_object_tombstone_settings_pkey');
48 Capsule::schema()->create(
'data_object_tombstone_oai_set_objects',
function (Blueprint $table) {
49 $table->bigInteger(
'object_id')->autoIncrement();
50 $table->bigInteger(
'tombstone_id');
51 $table->bigInteger(
'assoc_type');
52 $table->bigInteger(
'assoc_id');
53 $table->index([
'tombstone_id'],
'data_object_tombstone_oai_set_objects_tombstone_id');
62 Capsule::schema()->drop(
'data_object_tombstone_oai_set_objects');
63 Capsule::schema()->drop(
'data_object_tombstone_settings');
64 Capsule::schema()->drop(
'data_object_tombstones');