Setting tag plcapi-5.4-2
[plcapi.git] / extensions / README.txt
1 Create a database extension by creating a tree like follows:
2
3 - /usr/share/plc_api/extensions/<name>-up*
4 Contains the SQL or script that sets up the extension's database needs.
5 This needs to execute
6 INSERT INTO plc_db_extensions VALUES ('<name>', <version>);
7
8 - /usr/share/plc_api/extensions/<name>-down*
9 Contains the SQL or script that removes the extension from the database.
10
11 - /usr/share/plc_api/extensions/<name>/migrations/[0-9][0-9][0-9]-{up,down}-*
12 Migration scripts for the extension. One of the scripts for each version
13 has to execute
14 UPDATE plc_db_extensions SET version = <version> WHERE name = '<name>'