From: Christian Weiske Date: Wed, 17 Jan 2018 20:10:02 +0000 (+0100) Subject: Add XML validation XSD files X-Git-Tag: v0.6.5~4 X-Git-Url: https://git.cweiske.de/grauphel.git/commitdiff_plain/039b4685b39b6df44a9c203a397e9d0ec56bf32e Add XML validation XSD files --- diff --git a/tools/database.xsd b/tools/database.xsd new file mode 100644 index 0000000..33c61c7 --- /dev/null +++ b/tools/database.xsd @@ -0,0 +1,320 @@ + + + + + Database definition. These xml files were once + used for MDB2 which was a major source of bugs and + unmaintained. To keep compatibility the xml files definitions + are now parsed and used to create Doctrine schemas. To trigger + a database migration you need to increase your version number + in your info.xml file + + + + + + + Value is ignored + + + + + Value is ignored + + + + + Value is ignored + + + + + Value is ignored + + + + + Each table contains a full database + table + + + + + + + + + + + + + + + + + + + Table name. You can and should use + *dbprefix* before your table, e.g. + *dbprefix*news_items. The value will be replaced with a + configurable prefix and defaults to "oc_" + + + + + + Value is ignored + + + + + Value is ignored + + + + + Value is ignored + + + + + Contains the actual database columns and + indices + + + + + + + + + + + A list of columns + + + + + A list of indices on that table + + + + + + + + + + + Column name + + + + + Column types. Certain types like integer + (aka smallint, integer, bigint), clob (aka text), text + (aka string), timestamp (aka datetime) and numeric (aka + decimal) are special to Nextcloud and will be + translated to their doctrine equivalents. Everything + else will be sent as is to doctrines type system. See + http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html + for a list of all types + + + + + + Length of the type. This will not only + define how long your text columns aka VARCHARs will be + set but also determine the size of the integer field: + < 4 will be transformed to smallint, 4 will be + transformed to integer and > 4 will be transformed + to bigint + + + + + + Can only be set for numeric values like + float, integer, etc. and will make them unsigned + + + + + + If a value should never be null + + + + + + Can only be set for primary keys + + + + + + Default value if given. Can also be empty + in which case the default will be an empty string. + + + + + + Doctrine comment, can be ignored + + + + + + True for the primary key. For composed + primary keys use a unique index. + + + + + + Total number of digits for a + numerics/decimal type including decimal digits, e.g. + precision 3 and scale 2 will only allow 3.21 but not + 23.21 + + + + + + Scale for a numeric/decimal type, e.g. 2 + will save decimals with two decimal places: 3.21 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Element for defining indices. Can also be used to + define composite primary keys: simply add more than one field + to an index and define it as unique + + + + + + Index name. Should be unique + + + + + + True if the index is in fact a primary + key. Will be ignored if the primary key is already set + in the field section + + + + + + If the index for the field or combination + of fields should be unique + + + + + + List of index fields that are used to + create the index + + + + + + + + + + + Name of the column that should be + indexed + + + + + + Value is ignored + + + + + + + + + + + + diff --git a/tools/info.xsd b/tools/info.xsd new file mode 100644 index 0000000..efd6d2d --- /dev/null +++ b/tools/info.xsd @@ -0,0 +1,627 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +