Lines Matching +full:php +full:- +full:version
1 <?php
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
34 * Upgrade the database schema from version 42 to version 43.
52 $data = DB::table('module_privacy')->get();
54 DB::schema()->drop('module_privacy');
56 DB::schema()->create('module_privacy', static function (Blueprint $table): void {
57 $table->increments('id');
58 $table->string('module_name', 32);
59 $table->integer('gedcom_id');
60 $table->string('interface');
61 $table->tinyInteger('access_level');
64 $key1 = DB::prefix($table->getTable() . '_ix1');
65 $key2 = DB::prefix($table->getTable() . '_ix2');
67 $table->unique(['gedcom_id', 'module_name', 'interface'], $key1);
68 $table->unique(['module_name', 'gedcom_id', 'interface'], $key2);
70 … $table->foreign('module_name')->references('module_name')->on('module')->onDelete('cascade');
71 … $table->foreign('gedcom_id')->references('gedcom_id')->on('gedcom')->onDelete('cascade');
75 DB::table('module_privacy')->insert([
76 'module_name' => $datum->module_name,
77 'gedcom_id' => $datum->gedcom_id,
78 'interface' => self::COMPONENT_TO_INTERFACE[$datum->component],
79 'access_level' => $datum->access_level,