{ "upstream_commit": "3516c776a1fcbd83d234efc007e3a49807d6ed91", "kind": "ordered migration evidence; not a materialized SQL schema", "drivers": [ "sqlite", "mysql", "pgsql", "sqlsrv" ], "migrations": [ { "file": "database/migrations/2014_10_12_000000_create_users_table.php", "sha256": "9a54cf93367bc7c19790a5c0f8182f733c48692f559a2fc3bc6285caedcc9f2c", "schema_operations": [ [ "create", "users" ] ], "up_source": "bigIncrements('id');\n $table->string('name');\n $table->string('email')->unique();\n $table->timestamp('email_verified_at')->nullable();\n $table->string('password');\n $table->rememberToken();\n $table->timestamps();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2014_10_12_100000_create_password_resets_table.php", "sha256": "42824028ead8eb9813f0d568f830def27145d5ac52288021cb7a6337d3810c41", "schema_operations": [ [ "create", "password_resets" ] ], "up_source": "string('email')->index();\n $table->string('token');\n $table->timestamp('created_at')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2016_06_01_000001_create_oauth_auth_codes_table.php", "sha256": "90ab218a2616ba5e7320fbfe57fd0f8cf39a85542300634fecf691a85a6bf6bb", "schema_operations": [ [ "create", "oauth_auth_codes" ] ], "up_source": "string('id', 100)->primary();\n $table->unsignedBigInteger('user_id')->index();\n $table->unsignedBigInteger('client_id');\n $table->text('scopes')->nullable();\n $table->boolean('revoked');\n $table->dateTime('expires_at')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2016_06_01_000002_create_oauth_access_tokens_table.php", "sha256": "acbeb29866718be6bb0ebf0bf85d4d76f9a34d62b682ca248e82c085a001f2b0", "schema_operations": [ [ "create", "oauth_access_tokens" ] ], "up_source": "string('id', 100)->primary();\n $table->unsignedBigInteger('user_id')->nullable()->index();\n $table->unsignedBigInteger('client_id');\n $table->string('name')->nullable();\n $table->text('scopes')->nullable();\n $table->boolean('revoked');\n $table->timestamps();\n $table->dateTime('expires_at')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php", "sha256": "09a2853433a722f175bb35564576ff1717fc8c54cc6a1e9e7589884098e9a071", "schema_operations": [ [ "create", "oauth_refresh_tokens" ] ], "up_source": "string('id', 100)->primary();\n $table->string('access_token_id', 100)->index();\n $table->boolean('revoked');\n $table->dateTime('expires_at')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2016_06_01_000004_create_oauth_clients_table.php", "sha256": "728b8744edd184b00ed89dfd1e7eca17091819b05a8cb5b5c89b79fde5459b14", "schema_operations": [ [ "create", "oauth_clients" ] ], "up_source": "bigIncrements('id');\n $table->unsignedBigInteger('user_id')->nullable()->index();\n $table->string('name');\n $table->string('secret', 100)->nullable();\n $table->string('provider')->nullable();\n $table->text('redirect');\n $table->boolean('personal_access_client');\n $table->boolean('password_client');\n $table->boolean('revoked');\n $table->timestamps();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php", "sha256": "37b718559569e3278bfa6e2f8c6079b68e21bad0a5b7f233f9ef313e357e3318", "schema_operations": [ [ "create", "oauth_personal_access_clients" ] ], "up_source": "bigIncrements('id');\n $table->unsignedBigInteger('client_id');\n $table->timestamps();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2017_03_03_100000_create_options_table.php", "sha256": "1afffe540e1bfe170e1aa6193ffe9b7174445ebfbb81f08315af60bf106918e8", "schema_operations": [ [ "create", "options" ] ], "up_source": "increments('id');\n $table->string('key')->unique();\n $table->text('value');\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2019_05_16_162730_create_twofaccounts_table.php", "sha256": "9bae015ba5bbf15559929034c3ec24b3fee876f8ca77f2b22391601441c77baa", "schema_operations": [ [ "create", "twofaccounts" ] ], "up_source": "increments('id');\n $table->string('service');\n $table->string('uri');\n $table->string('account')->nullable();\n $table->string('icon')->nullable();\n $table->timestamps();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_03_25_095517_add_order_column_to_twofaccounts_table.php", "sha256": "edb194adbc45fc94b81f6884b5673cf3445a4ce7a9f6d98e17b4496f93b7529d", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "integer('order_column')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_10_05_210557_add_last_seen_to_users_table.php", "sha256": "9db541b7e488c32e8e8a2029b46e88dcbdf065ea1cbd56515c1bee51be7f5baa", "schema_operations": [ [ "table", "users" ] ], "up_source": "timestamp('last_seen_at')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_10_11_202302_add_provider_column_to_oauth_clients_table.php", "sha256": "2e5693204137ded1fd9bf4816861dde0098468a21a08303339213d6c5a3ac701", "schema_operations": [ [ "table", "oauth_clients" ] ], "up_source": "string('provider')->after('secret')->nullable();\n } \n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_10_20_210129_create_groups_table.php", "sha256": "cba276718ffc803b04798837635d871e0869ed26dc851c3703b8a399de8ac5f2", "schema_operations": [ [ "create", "groups" ] ], "up_source": "increments('id');\n $table->string('name');\n $table->timestamps();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_10_20_211115_add_group_id_column_to_twofaccounts_table.php", "sha256": "5c9e50dfc4a879daaaf2014f1f649477095f615601b1b6190ec7ef76e334688b", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "unsignedInteger('group_id')\n ->after('id')\n ->nullable();\n\n $table->foreign('group_id')->references('id')->on('groups')->onDelete('set null');\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_12_04_073604_alter_encrypted_columns_to_text.php", "sha256": "6d8135b35bce5c1ecce23b202f4ce1d4a46b1e37ec9c4f6c66d697cf4f3db311", "schema_operations": [ [ "table", "twofaccounts" ], [ "table", "twofaccounts" ] ], "up_source": "getConnection())->getConnection()->getDriverName();\n\n if ('sqlite' !== $driver) {\n \n Schema::table('twofaccounts', function (Blueprint $table) {\n $table->text('account')->nullable()->change();\n });\n\n Schema::table('twofaccounts', function (Blueprint $table) {\n $table->text('uri')->change();\n });\n }\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_12_04_073605_alter_encrypted_columns_to_text_for_sqlite.php", "sha256": "74a70bcced630cd0fdf47c8953d9f6c9a1f095ef13a71e5864b30c05468a0a67", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "getConnection())->getConnection()->getDriverName();\n\n if ('sqlite' === $driver) {\n \n Schema::table('twofaccounts', function (Blueprint $table) {\n $table->text('account')->nullable()->change();\n });\n }\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2020_12_04_073606_alter_encrypted_columns_to_text_for_sqlite_bis.php", "sha256": "2b0f52bf20b8a2c76f07d42b7ad34c7d61607cc1d134970e2516055abae6eac1", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "getConnection())->getConnection()->getDriverName();\n\n if ('sqlite' === $driver) {\n \n Schema::table('twofaccounts', function (Blueprint $table) {\n $table->text('uri')->change();\n });\n }\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2021_09_08_191139_split_twofaccounts_uri_in_multiple_columns.php", "sha256": "e947fd2f184dbe47fcd6ad63ca27ee3ae86a08fa227150e3d6c7115f0ea13609", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "string('otp_type', 10)->nullable();\n $table->text('secret')->nullable();\n $table->string('algorithm', 20)->nullable();\n $table->unsignedSmallInteger('digits')->nullable();\n $table->unsignedInteger('period')->nullable();\n $table->unsignedBigInteger('counter')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2021_09_08_191140_rename_uri_to_legacy_uri.php", "sha256": "3c019abddcec98c3f3acebca764b44a9215e1d8e4b05997be27f52eb1d4f5fad", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "renameColumn('uri', 'legacy_uri');\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2021_09_14_195451_change_nullable_in_twofaccounts_table.php", "sha256": "f82b9dd27fb6853c3735d7a650a527ca542096ba4ace8d256c723e1af213559a", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "select('id', 'legacy_uri')->get();\n\n foreach ($twofaccounts as $twofaccount) {\n try {\n $legacy_uri = $settingService->get('useEncryption') ? Crypt::decryptString($twofaccount->legacy_uri) : $twofaccount->legacy_uri;\n $token = \\OTPHP\\Factory::loadFromProvisioningUri($legacy_uri);\n\n $affected = DB::table('twofaccounts')\n ->where('id', $twofaccount->id)\n ->update([\n 'otp_type' => get_class($token) === 'OTPHP\\TOTP' ? 'totp' : 'hotp',\n 'secret' => $settingService->get('useEncryption') ? Crypt::encryptString($token->getSecret()) : $token->getSecret(),\n 'algorithm' => $token->getDigest(),\n 'digits' => $token->getDigits(),\n 'period' => $token->hasParameter('period') ? $token->getParameter('period') : null,\n 'counter' => $token->hasParameter('counter') ? $token->getParameter('counter') : null\n ]);\n }\n catch(Exception $ex)\n {\n Log::error($ex->getMessage());\n Log::error(\"TwoFAccount with id #\" . $twofaccount->id . \" could not be splited\");\n }\n }\n\n $twofaccounts = DB::table('twofaccounts')\n ->whereNull('account')\n ->orWhereNull('otp_type')\n ->orWhereNull('secret')\n ->orWhereNull('algorithm')\n ->orWhereNull('digits')\n ->get();\n\n foreach ($twofaccounts as $twofaccount) {\n\n $affected = DB::table('twofaccounts')\n ->where('id', $twofaccount->id)\n ->update([\n 'account' => $twofaccount->account === null ? 'account (invalid)' : $twofaccount->account + ' (invalid)',\n 'otp_type' => $twofaccount->otp_type === null ? 'totp' : $twofaccount->otp_type,\n 'secret' => $twofaccount->secret === null ? 'secret' : $twofaccount->secret,\n 'algorithm' => $twofaccount->algorithm === null ? 'sha1' : $twofaccount->algorithm,\n 'digits' => $twofaccount->digits === null ? 6 : $twofaccount->digits,\n ]);\n }\n\n Schema::table('twofaccounts', function (Blueprint $table) {\n $table->text('account')->nullable(false)->change();\n $table->string('service')->nullable()->change();\n $table->string('otp_type', 10)->nullable(false)->change();\n $table->text('secret')->nullable(false)->change();\n $table->string('algorithm', 20)->nullable(false)->change();\n $table->unsignedSmallInteger('digits')->nullable(false)->change();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2021_12_03_220140_create_web_authn_tables.php", "sha256": "8f0263cc66f1104be3687cfe76e1d15e9d353e8fa13c0993d4b9bb3aa2c40d4f", "schema_operations": [ [ "create", "web_authn_credentials" ], [ "create", "web_authn_recoveries" ] ], "up_source": "string('id', 191);\n\n // Change accordingly for your users table if you need to.\n $table->unsignedBigInteger('user_id');\n\n $table->string('name')->nullable();\n $table->string('type', 16);\n $table->json('transports');\n $table->string('attestation_type');\n $table->json('trust_path');\n $table->uuid('aaguid');\n $table->binary('public_key');\n $table->unsignedInteger('counter')->default(0);\n\n // This saves the external \"ID\" that identifies the user. We use UUID default\n // since it's very straightforward. You can change this for a plain string.\n // It must be nullable because those old U2F keys do not use user handle.\n $table->uuid('user_handle')->nullable();\n\n $table->timestamps();\n $table->softDeletes('disabled_at');\n\n $table->primary(['id', 'user_id']);\n });\n\n Schema::create('web_authn_recoveries', function (Blueprint $table) {\n $table->string('email')->index();\n $table->string('token');\n $table->timestamp('created_at')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2022_10_20_122032_create_webauthn_credentials.php", "sha256": "efbc545fef44d08e60864c13747813e6ec3c7e187526905aec46cbd1dc0a00f6", "schema_operations": [ [ "create", "webauthn_credentials" ], [ "dropIfExists", "web_authn_credentials" ], [ "rename", "web_authn_recoveries" ] ], "up_source": "where('key', 'useWebauthnOnly')->delete();\n\n Schema::create('webauthn_credentials', static function (Blueprint $table): void {\n static::defaultBlueprint($table);\n });\n\n Schema::dropIfExists('web_authn_credentials');\n Schema::rename('web_authn_recoveries', 'webauthn_recoveries');\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2023_02_10_145413_add_is_admin_and_preferences_to_users_table.php", "sha256": "ac99520222b19b6fb6eb1fee3b9e4fb27f70a1131adf63fe5abe49f6253eb442", "schema_operations": [ [ "table", "users" ] ], "up_source": "boolean('is_admin')\n ->after('password')\n ->default(0);\n $table->json('preferences')->nullable();\n });\n\n DB::table('users')->update(['is_admin' => 1]);\n\n // The 'useWebauthnAsDefault' option is replaced by a local storage record\n // so we delete it form the Options table to prevent its conversion to\n // a user preference\n DB::table('options')->where('key', 'useWebauthnAsDefault')->delete();\n\n // User options are converted as user preferences\n $options = DB::table('options')->get();\n $preferences = config('2fauth.preferences');\n\n foreach ($options as $option) {\n if (Arr::has($preferences, $option->key)) {\n DB::table('users')->update(['preferences->'.$option->key => static::restoreType($option->value)]);\n DB::table('options')->where('id', $option->id)->delete();\n }\n }\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2023_02_21_143845_bind_twofaccounts_and_groups_to_users.php", "sha256": "a8aa4e17c978ded37228bc143bb043258cb122df240529e69d165e61f0c8f75b", "schema_operations": [ [ "table", "twofaccounts" ], [ "table", "groups" ] ], "up_source": "unsignedBigInteger('user_id')\n ->after('id')\n ->nullable();\n\n $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();\n });\n\n Schema::table('groups', function (Blueprint $table) {\n $table->unsignedBigInteger('user_id')\n ->after('id')\n ->nullable();\n\n $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();\n });\n\n if ($legacySingleUser = DB::table('users')->first()) {\n DB::table('twofaccounts')->update(['user_id' => $legacySingleUser->id]);\n DB::table('groups')->update(['user_id' => $legacySingleUser->id]);\n }\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2023_03_13_114928_set_username_unique.php", "sha256": "1fe7623bb6503d7d783a6fac526513f184dfd934951710c2fc370de5d5879bc2", "schema_operations": [ [ "table", "users" ] ], "up_source": "unique('name');\n });\n }\n\n /**\n * Reverse the migrations.\n *\n * @return void\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2023_12_06_131842_add_oauth_columns_to_user.php", "sha256": "d7f7996ffee6f499903607b3acbaf131913dcaecacb72ea61bf1f1bb95597f7a", "schema_operations": [ [ "table", "users" ] ], "up_source": "string('oauth_provider', 100)\n ->after('id')\n ->nullable();\n $table->string('oauth_id', 200)\n ->after('id')\n ->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2024_04_14_082519_create_auth_logs_table.php", "sha256": "bbc10e41c09a374c53a9206c5467b58cd6c8bdf4de57982cadb3f24d2315b06c", "schema_operations": [ [ "create", "auth_logs" ] ], "up_source": "id();\n $table->morphs('authenticatable');\n $table->string('ip_address', 45)->nullable();\n $table->text('user_agent')->nullable();\n $table->timestamp('login_at')->nullable()->index();\n $table->boolean('login_successful')->default(false)->index();\n $table->timestamp('logout_at')->nullable()->index();\n $table->boolean('cleared_by_user')->default(false);\n $table->string('guard', 40)->nullable();\n $table->string('login_method', 40)->nullable();\n\n $table->foreign('authenticatable_id')->references('id')->on('users')->cascadeOnDelete();\n });\n }\n\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2024_06_01_000001_create_oauth_device_codes_table.php", "sha256": "f58e7e0409628118d1808631d8270692e54fdb2f227020365bb30a18b0564336", "schema_operations": [ [ "create", "oauth_device_codes" ] ], "up_source": "char('id', 80)->primary();\n $table->foreignId('user_id')->nullable()->index();\n $table->foreignUuid('client_id')->index();\n $table->char('user_code', 8)->unique();\n $table->text('scopes');\n $table->boolean('revoked');\n $table->dateTime('user_approved_at')->nullable();\n $table->dateTime('last_polled_at')->nullable();\n $table->dateTime('expires_at')->nullable();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2024_08_08_133135_alter_twofaccount_service_field_to_text.php", "sha256": "b33cf9bb4347706c63f0d1df1eae27a6200349e268b007554108fc00850911b9", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "text('service')->nullable()->change();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2024_08_08_133136_encrypt_twofaccount_service_field.php", "sha256": "396a7313b4713d7f6b00c411117746a86a6c1b8c02bdb2520c9b29fc818bf935", "schema_operations": [], "up_source": "dbIsEncrypted() && Schema::getColumnType('twofaccounts', 'service') === 'text') {\n $this->encryptServiceField();\n }\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2024_09_12_151037_create_session_table.php", "sha256": "293923a1544ca6a69c25c60c65c1e1fd75f14968820dea122977c0a2d33183ce", "schema_operations": [ [ "create", "sessions" ] ], "up_source": "string('id')->primary();\n $table->foreignId('user_id')->nullable()->index();\n $table->string('ip_address', 45)->nullable();\n $table->text('user_agent')->nullable();\n $table->longText('payload');\n $table->integer('last_activity')->index();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2024_09_12_151132_create_cache_table.php", "sha256": "fbb4665e5a977e71df4e74ec75b3c06ca4f17ad0de7138fe9786639189978e77", "schema_operations": [ [ "create", "cache" ], [ "create", "cache_locks" ] ], "up_source": "string('key')->primary();\n $table->mediumText('value');\n $table->bigInteger('expiration')->index();\n });\n\n Schema::create('cache_locks', function (Blueprint $table) {\n $table->string('key')->primary();\n $table->string('owner');\n $table->bigInteger('expiration')->index();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2024_09_30_110610_create_icons_table.php", "sha256": "83f1c5df8f1314f616d09fcf499dcbb9495ecfa95ceae092da877991ea5fc9f0", "schema_operations": [ [ "create", "icons" ] ], "up_source": "string('name')->primary();\n $table->longText('content');\n $table->timestamps();\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2025_10_29_141837_add_order_column_to_groups_table.php", "sha256": "88d015dcfde38a46bfab14fa9dfea2551893e9b08289b5ed39856c48e54e9952", "schema_operations": [ [ "table", "groups" ] ], "up_source": "integer('order_column')->nullable();\n });\n\n // The primary index is used to set a default value for the newly\n // created order_column\n foreach (Group::get() as $group) {\n $group->order_column = $group->id;\n $group->save();\n }\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_03_15_000000_create_twofaccount_shares_table.php", "sha256": "4771490844dc6b0c59a6cfe031de11dfdc0c55578d0f1f3495f849c05bc7d94e", "schema_operations": [ [ "create", "twofaccount_shares" ] ], "up_source": "id();\n $table->unsignedInteger('twofaccount_id');\n $table->foreign('twofaccount_id')->references('id')->on('twofaccounts')->cascadeOnDelete();\n $table->foreignId('shared_with_user_id')->nullable()->constrained('users')->cascadeOnDelete();\n $table->string('scope', 24);\n $table->foreignId('created_by_user_id')->constrained('users')->cascadeOnDelete();\n $table->timestamps();\n\n $table->index(['twofaccount_id', 'scope']);\n $table->index('shared_with_user_id');\n $table->unique(['twofaccount_id', 'scope', 'shared_with_user_id'], 'twofaccount_shares_unique_target');\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_04_14_000000_create_twofaccount_group_assignments_table.php", "sha256": "8deb3b22c6eb4f55b9f8e58d483da2922faff2f03ad890b3b10a8710273976d2", "schema_operations": [ [ "create", "twofaccount_group_assignments" ] ], "up_source": "id();\n $table->unsignedInteger('twofaccount_id');\n $table->unsignedBigInteger('user_id');\n $table->unsignedInteger('group_id');\n $table->timestamps();\n\n $table->foreign('twofaccount_id')->references('id')->on('twofaccounts')->cascadeOnDelete();\n $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();\n $table->foreign('group_id')->references('id')->on('groups')->cascadeOnDelete();\n\n $table->unique(['twofaccount_id', 'user_id'], 'twofaccount_group_assignments_unique_scope');\n $table->index('group_id');\n $table->index('user_id');\n });\n\n $this->backfillLegacyAssignments();\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_04_14_010000_drop_group_id_from_twofaccounts_table.php", "sha256": "75ca1423667f8b6cb825cd21841fccd296b9876b7edfabc2f4c8a88ad99dfaba", "schema_operations": [ [ "table", "twofaccounts" ], [ "table", "twofaccounts" ] ], "up_source": "dropForeign(['group_id']);\n }\n });\n\n Schema::table('twofaccounts', function (Blueprint $table) {\n $table->dropColumn('group_id');\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_04_15_000000_create_twofaccount_user_orders_table.php", "sha256": "c8acb8a9ab653f3887c00f9912ad4d137e467ba81957b925759382401ed5f7ef", "schema_operations": [ [ "create", "twofaccount_user_orders" ] ], "up_source": "id();\n $table->unsignedBigInteger('user_id');\n $table->unsignedInteger('twofaccount_id');\n $table->unsignedInteger('position');\n $table->timestamps();\n\n $table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();\n $table->foreign('twofaccount_id')->references('id')->on('twofaccounts')->cascadeOnDelete();\n\n $table->unique(['user_id', 'twofaccount_id'], 'twofaccount_user_orders_unique_scope');\n $table->index(['user_id', 'position']);\n $table->index('twofaccount_id');\n });\n\n $this->backfillLegacyOrderColumnValues();\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_04_15_010000_drop_order_column_from_twofaccounts_table.php", "sha256": "ceebf07f020664a66531ab8d967b40b5c9e58383e9dbee2d156fe55f683ac5e9", "schema_operations": [ [ "table", "twofaccounts" ] ], "up_source": "dropColumn('order_column');\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_05_16_074427_create_otp_logs_table.php", "sha256": "19c230dc2ac7b97af06444430820c1afb552f059c08200e82c9c0349612423a3", "schema_operations": [ [ "create", "otp_logs" ] ], "up_source": "id();\n $table->unsignedBigInteger('requester_id')->nullable();\n $table->string('requester_name');\n $table->string('requester_email');\n $table->unsignedBigInteger('owner_id')->nullable();\n $table->string('owner_name');\n $table->string('owner_email');\n $table->unsignedInteger('twofaccount_id');\n $table->string('ip_address', 45);\n $table->string('otp_type', 10);\n $table->unsignedMediumInteger('counter')->nullable();\n $table->timestamp('generated_at');\n\n $table->foreign('requester_id')->references('id')->on('users')->nullOnDelete();\n $table->foreign('owner_id')->references('id')->on('users')->nullOnDelete();\n $table->foreign('twofaccount_id')->references('id')->on('twofaccounts')->cascadeOnDelete();\n\n $table->index('requester_id');\n $table->index('twofaccount_id');\n $table->index('ip_address');\n $table->index('otp_type');\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_06_10_153224_add_show_in_chips_column_to_group.php", "sha256": "fd4e2f61e2ddf4644a5d3ed0e3c76382745631a5e3d426d49d45733e94ae8c47", "schema_operations": [ [ "table", "groups" ] ], "up_source": "boolean('show_in_chips')\n ->after('name')\n ->default(false);\n });\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." }, { "file": "database/migrations/2026_08_29_175933_update_oauth_clients_table_for_passport_13.php", "sha256": "af7bc5f94d94be7ab8a1bd8d2622c8448f6a3e8f16edd40eb30a53b9a6028391", "schema_operations": [ [ "table", "oauth_clients" ], [ "table", "oauth_clients" ], [ "dropIfExists", "oauth_personal_access_clients" ] ], "up_source": "nullableMorphs('owner', after: 'user_id');\n\n $table->after('provider', function (Blueprint $table) {\n $table->text('redirect_uris')->nullable();\n $table->text('grant_types')->nullable();\n });\n });\n\n foreach (Passport::client()->cursor() as $client) {\n Model::withoutTimestamps(fn () => $client->forceFill([\n 'owner_id' => $client->user_id,\n 'owner_type' => $client->user_id\n ? config('auth.providers.'.($client->provider ?: config('auth.guards.api-guard.provider')).'.model')\n : null,\n 'redirect_uris' => $client->redirect_uris,\n 'grant_types' => ['personal_access', 'refresh_token'],\n ])->save());\n }\n\n Schema::table('oauth_clients', function (Blueprint $table) {\n $table->dropIndex('oauth_clients_user_id_index');\n $table->dropColumn(['user_id', 'redirect', 'personal_access_client', 'password_client']);\n\n $table->text('redirect_uris')->nullable(false)->change();\n $table->text('grant_types')->nullable(false)->change();\n });\n\n Schema::dropIfExists('oauth_personal_access_clients');\n }\n\n /**\n * Reverse the migrations.\n */\n ", "note": "Raw up source includes exact definitions and transformations. Helpers defined after down may need the full source; no SQL schema is inferred." } ] }