Magento Expert Forum - Improve your Magento experience

Results 1 to 13 of 13

How to create custom table in Magento2 Module?

  1. #1

  2. #2

  3. #3
    Junior Member
    Join Date
    Sep 2016
    Posts
    228
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Last edited by vishnu; 13-03-2019 at 08:04 AM.

  4. #4
    New member
    Join Date
    May 2018
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hello please helping me to find out that how we can print or access custom collection.
    Mageplaza\HelloWorld\Block\Post.php

    -----------------
    Buy Ladies Linen Suits Online: Grab Latest Designer Linen Suits collection 2020 at affordable price.
    Last edited by harryjon; 05-10-2020 at 07:18 AM.

  5. #5
    Junior Member
    Join Date
    May 2018
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    For Beginners such like me, It's helpful

  6. #6
    Junior Member
    Join Date
    Jun 2018
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for sharing with us

  7. #7
    Junior Member fay_khattak's Avatar
    Join Date
    Jan 2016
    Location
    Karachi, Pakistan
    Posts
    50
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    To create custom tables for Magento 2 module, setup scripts can come in handy in such cases. Setup scripts in Magento 2 are essential when writing custom modules. We have 6 different types of Setup Scripts that can be used with our custom modules:

    - InstallSchema
    - UpgradeSchema
    - InstallData
    - UpgradeData
    - Recurring
    - Uninstall

    Setup scripts in Magento 2 are triggered using the Command Line Interface (CLI). To know more about it, check out this blog post:

    https://www.cloudways.com/blog/setup...-in-magento-2/

  8. #8
    Junior Member
    Join Date
    Sep 2017
    Posts
    47
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    Thank you for the informative post.

  9. #9
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Run the overhaul contents and confirm that the table has changed. Stage 1: Create another module. Stage 2: Create an InstallSchema content. Stage 3: Create an InstallData content. Stage 4: Add another module and check that a table with information was made. Stage 5: Create an UpgradeSchema content. Stage 6: Create the UpgradeData content.

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
  •