Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

How to Add an Extra Column in Your Existing Magento 2 Table?

  1. #1
    Junior Member
    Join Date
    May 2015
    Posts
    36
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default How to Add an Extra Column in Your Existing Magento 2 Table?

    While doing Magento 2 programming, sometimes you feel a need to add an extra column to your already existing Magento 2 table. That’s why we have come up with another “How to” blog to help you. In this blog, we will use the UpgradeSchema.php file for adding extra columns in existing Magento 2 tables and this file should be under setup folder of the module.

    Learn More: https://www.envisionecommerce.com/ho...agento-2-table/

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    635
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Stage 1: Create a record called 'UpgradeSchema.php' in the setup organizer of module, for example

    Stage 2: After sparing records, you have to run php canister/magento setup:upgrade.

    Note: If you face any issue, it might be because of the module that you have just introduced.

    End:

  3. #3
    Junior Member
    Join Date
    Sep 2018
    Location
    Canada
    Posts
    873
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Stage 1: Create a document called 'UpgradeSchema.php' in the setup organizer of module.

    Stage 2: After sparing documents, you have to run php container/magento setup:upgrade. Presently check your database and you will probably locate another custom table and new section in 'sales_order_payment' table.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •