Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sistempos_finaltask
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mujahid Rofiq
  • sistempos_finaltask
  • Merge requests
  • !347

Merged
Created 10 months ago by Mujahid Rofiq@MujahidRMaintainer

p

  • Overview 1
  • Commits 1
  • Changes 1

Created by: MujahidRopiq

  • Mujahid Rofiq
    Mujahid Rofiq @MujahidR · 10 months ago
    Author Maintainer

    Merged by: MujahidRopiq at 2024-08-28 11:31:14 UTC

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • main (base)

and
  • latest version
    5b2baa1c
    1 commit, 10 months ago

1 file
+ 1
- 7

    Preferences

    File browser
    Compare changes
database/migrations/2024_08_16_033829_alter_paymentpurch.php
+ 1
- 7
  • View file @ 5b2baa1c

  • Edit in single-file editor

  • Edit in Web IDE


Show all unchanged lines Show 20 lines
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
Show 20 lines Show all unchanged lines Show 20 lines
public function up()
{
Schema::table('payment_purchases', function (Blueprint $table) {
// Drop the existing foreign key constraint
$table->dropForeign(['user_id']);
// Change the column to be nullable
$table->integer('user_id')->nullable()->change();
// Re-add the foreign key constraint
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
}
Show 20 lines Show all unchanged lines Show 20 lines
{
Schema::table('payment_purchases', function (Blueprint $table) {
// Drop the existing foreign key constraint
$table->dropForeign(['user_id']);
// Revert the column to be non-nullable
$table->integer('user_id')->nullable(false)->change();
// Re-add the foreign key constraint
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
}
};
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
No estimate or time spent
0
Labels
None
Lock merge request
Unlocked
1
1 participant
Mujahid Rofiq
Reference: MujahidR/sistempos_finaltask!347
Source branch: dev-ropiq

Menu

Projects Groups Snippets
Help