Create custom database tables

Hi all, We know that in other CMS’s like magento, xtcommerce we can generate our database tables when our plugin is installed and drop them when plugin is uninstalled. They provide event for such activity.

Now In Oxid, I have never seen any event like this. First of all we don’t have event like installing the module and etc (if there is please let me know). Second If I want to create my database tables where can I put the code of create table queires that create tables of my need once When module runs first time. Is there any event?

Regards,
Awais Qarni

No, SQL is run manually, no installation mechanism yet. I suggest you get some free modules from oxidforge or exchange and look at installation procedure, usually its 3 steps:

  • copy files
  • run SQL
  • adjust templates (if needed)

[QUOTE=leofonic;82560]No, SQL is run manually, no installation mechanism yet. I suggest you get some free modules from oxidforge or exchange and look at installation procedure, usually its 3 steps:

  • copy files
  • run SQL
  • adjust templates (if needed)[/QUOTE]
    Hi leofonic thanks. I am enjoying development in oxid now. Dude I have visited my modules but couldn’t find any one that is free and having all these three steps. Can you point out some? And one more It’s mean every user has to do the same three steps when he wants to install my module downloaded from market place?

Hi,

check out this one:
http://www.oxid-esales.com/en/exchange/extensions/firstvariant

:wink: