Duplication Error

Posted In Laravel
  • nurdaulet-shamilov 7 months ago
    I am getting this error:
      Illuminate\Database\QueryException  : SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'chatter_category_id' (SQL: alter table `chatter_discussion` add `chatter_category_id` int unsigned not null, add `user_id` bigint unsigned not null)
    	
    	My Migration file is this
    				
    				Schema::table('chatter_discussion', function (Blueprint $table) {
                $table->integer('chatter_category_id')->unsigned()->index();
                $table->foreign('chatter_category_id')->references('id')->on('chatter_categories')
                            ->onDelete('cascade')
                            ->onUpdate('cascade');
                $table->bigInteger('user_id')->unsigned()->index();
                $table->foreign('user_id')->references('id')->on('users')
                            ->onDelete('cascade')
                            ->onUpdate('cascade');
            });
            Schema::table('chatter_post', function (Blueprint $table) {
                $table->integer('chatter_discussion_id')->unsigned()->index();
                $table->foreign('chatter_discussion_id')->references('id')->on('chatter_discussion')
                            ->onDelete('cascade')
                            ->onUpdate('cascade');
                $table->bigInteger('user_id')->unsigned()->index();
                $table->foreign('user_id')->references('id')->on('users')
                            ->onDelete('cascade')
                            ->onUpdate('cascade');
            });

    I am getting this error: Illuminate\Database\QueryException : SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'chatter_category_id' (SQL: alter table chatter_discussion add chatter_category_id int unsigned not null, add user_id bigint unsigned not null)

    My Migration file is this
    			
    			Schema::table('chatter_discussion', function (Blueprint $table) {
            $table->integer('chatter_category_id')->unsigned()->index();
            $table->foreign('chatter_category_id')->references('id')->on('chatter_categories')
                        ->onDelete('cascade')
                        ->onUpdate('cascade');
            $table->bigInteger('user_id')->unsigned()->index();
            $table->foreign('user_id')->references('id')->on('users')
                        ->onDelete('cascade')
                        ->onUpdate('cascade');
        });
        Schema::table('chatter_post', function (Blueprint $table) {
            $table->integer('chatter_discussion_id')->unsigned()->index();
            $table->foreign('chatter_discussion_id')->references('id')->on('chatter_discussion')
                        ->onDelete('cascade')
                        ->onUpdate('cascade');
            $table->bigInteger('user_id')->unsigned()->index();
            $table->foreign('user_id')->references('id')->on('users')
                        ->onDelete('cascade')
                        ->onUpdate('cascade');
        });
    
  • mateo-gavin 3 months ago
    I am just genuinely thrilled to come across this great site along with does get pleasure from looking at valuable content put up below. Your concepts in the publisher ended up being wonderful, cheers to the talk about.
    [Lingfield Accountants ](http://vpassociates.com/)
    

    I am just genuinely thrilled to come across this great site along with does get pleasure from looking at valuable content put up below. Your concepts in the publisher ended up being wonderful, cheers to the talk about. Lingfield Accountants

  • rodney-lutz 2 months ago
    If you set out to make me think today; mission accomplished!  I really like your writing style and how you express your ideas.  Thank you.	[url=https://singaporepropertylaunch.com.sg/properties/kent-ridge-hill-residences/]kent ridge hill residences price[/url]
    

    If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you. [url=https://singaporepropertylaunch.com.sg/properties/kent-ridge-hill-residences/]kent ridge hill residences price[/url]

  • rodney-lutz 2 months ago
    I just want to let you know that I just check out your site and I find it very interesting and informative..[elsitiocultural.org magazine](http://www.elsitiocultural.org/)

    I just want to let you know that I just check out your site and I find it very interesting and informative..elsitiocultural.org magazine

  • martin-garris 1 month ago
    I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. [viagra αγορα](http://www.cardealerhub.org/forums/discussion/68842/penile-implants-and-how-they-work)
    

    I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. viagra αγορα

  • rodney-lutz 1 month ago
    I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit.[games torrent](https://torrentsgames.org/)

    I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit.games torrent

  • rodney-lutz 1 month ago
    I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the best![friv](http://jeuxdefriv2020.com)

    I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Looking forward to another great article. Good luck to the author! All the bestfriv

  • rodney-lutz 1 month ago
    Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post. [Best Bluetooth Earphones Under 2000](https://totalreviews.in/best-bluetooth-earphones-under-2000/)

    Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post. Best Bluetooth Earphones Under 2000

  • rodney-lutz 4 weeks ago
    Excellent and very exciting site. Love to watch. Keep Rocking.[사다리](https://totovictory.com)

    Excellent and very exciting site. Love to watch. Keep Rocking.사다리

  • rodney-lutz 4 weeks ago
    This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.[κατασκευη ιστοσελίδας με wordpress](https://forskolindroz21.tumblr.com/post/188447150361/examples-of-the-stuff-you-need-to-are-aware-of/embed)

    This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.κατασκευη ιστοσελίδας με wordpress

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
Want to create your own SAAS?

I can teach you to create your own Software as a Service. Click here to learn more!

Visit SAAS Adventure!