How to add a table to an extension

  • Hello,


    I am testing Page Kit and I created a simple test extension. However I would like to link this extension to a new table in the pagekit database. I read that it is possible to create the new table in the database according to the official documentation (https://pagekit.com/docs/developer/database) with Utility::createTable($table, \Closure $callback). But I don't understand where to use this and how.


    Maybe it is simple to create it directly in the database without command line? Is there a better documentation that explain how to add a new table in the database and link it to an extension that the one on the official website?


    Thank you

  • Thank you!


    I am trying this solution. I put this content in my scripts.php:


    But when I activate the exention it doesn't create anything in the database.

  • Ok I am going forward :)


    When installing the extension I have the message

    Code
    1. Loading composer repositories with package information
    2. Updating dependencies
    3. Your requirements could not be resolved to an installable set of packages.


    I think there are missing files in the package that I have to identify.