• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

Adding new columns to DB table

General Discussion
2
3
157
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    Esti last edited by 17 Feb 2025, 15:46

    Hi everyone,
    I'm trying to add a column in the Bagisto DB, but if I do the command php artisan migrate:fresh --seed it resets the db. So I cannot use this command to add a column or update a table. Moreover if I add the column by hand the things (text, number and other things) I insert in the input don't appear in the DB.
    What's the right procedure?
    Thank you in advance

    1 Reply Last reply Reply Quote 0
    • Rishabh-Webkul
      Rishabh-Webkul last edited by 19 Feb 2025, 04:55

      Hello @Esti

      Kindly go through the below link for the reference.

      Link: https://devdocs.bagisto.com/2.2/packages/create-migrations.html

      Or if you want to add a new column in the existing on just add the column and run php artisan migrate this will help to create a new column in your table

      Note: Don't make any custom changes in your existing functionalities kindly create a separate package for that otherwise it will create issues later on while you are upgrading your version.

      Thanks & Regards

      E 1 Reply Last reply 18 Mar 2025, 16:17 Reply Quote 0
      • 27 days later
      • E
        Esti @Rishabh-Webkul last edited by 18 Mar 2025, 16:17

        @Rishabh-Webkul Thank you for your answer.

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post