1 # SQL Package Installation Plugin
3 Execute SQL instructions using a MySQL-flavored syntax.
5 !!! warning "This file is parsed by WoltLab Suite Core to allow reverting of certain changes, but not every syntax MySQL supports is recognized by the parser. To avoid any troubles, you should always use statements relying on the SQL standard."
10 The `sql` package installation plugin expects a relative path to a `.sql` file.
17 WoltLab Suite Core uses a SQL parser to extract queries and log certain actions.
18 This allows WoltLab Suite Core to revert some of the changes you apply upon package uninstallation.
20 The logged changes are:
23 - `ALTER TABLE … ADD COLUMN`
24 - `ALTER TABLE … ADD … KEY`
28 It is possible to use different instance numbers, e.g. two separate WoltLab Suite Core installations within one database.
29 WoltLab Suite Core requires you to always use `wcf1_<tableName>` or `<app>1_<tableName>` (e.g. `blog1_blog` in WoltLab Suite Blog), the number (`1`) will be automatically replaced prior to execution.
30 If you every use anything other but `1`, you will eventually break things, thus always use `1`!
34 WoltLab Suite Core will determine the type of database tables on its own:
35 If the table contains a `FULLTEXT` index, it uses `MyISAM`, otherwise `InnoDB` is used.
42 WoltLab Suite Core cannot revert changes to the database structure which would cause to the data to be either changed or new data to be incompatible with the original format.
43 Additionally, WoltLab Suite Core does not track regular SQL queries such as `DELETE` or `UPDATE`.
47 WoltLab Suite Core does not support trigger since MySQL does not support execution of triggers if the event was fired by a cascading foreign key action.
48 If you really need triggers, you should consider adding them by custom SQL queries using a [script](script.md).
56 <instruction type="sql">install.sql</instruction>
64 filepath="package/pip/install.sql"