diff options
Diffstat (limited to 'tests/lib/DB/schemDiffData')
-rw-r--r-- | tests/lib/DB/schemDiffData/autoincrement.xml | 16 | ||||
-rw-r--r-- | tests/lib/DB/schemDiffData/clob.xml | 14 | ||||
-rw-r--r-- | tests/lib/DB/schemDiffData/core.xml | 1347 | ||||
-rw-r--r-- | tests/lib/DB/schemDiffData/default-1.xml | 51 | ||||
-rw-r--r-- | tests/lib/DB/schemDiffData/unsigned.xml | 68 |
5 files changed, 1496 insertions, 0 deletions
diff --git a/tests/lib/DB/schemDiffData/autoincrement.xml b/tests/lib/DB/schemDiffData/autoincrement.xml new file mode 100644 index 00000000000..458c5d8166f --- /dev/null +++ b/tests/lib/DB/schemDiffData/autoincrement.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" ?> +<database> + <table> + <name>*dbprefix*external_config</name> + <declaration> + <field> + <name>config_id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <length>6</length> + </field> + </declaration> + </table> +</database> diff --git a/tests/lib/DB/schemDiffData/clob.xml b/tests/lib/DB/schemDiffData/clob.xml new file mode 100644 index 00000000000..08aef18c31d --- /dev/null +++ b/tests/lib/DB/schemDiffData/clob.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8" ?> +<database> + <table> + <name>*dbprefix*external_config</name> + <declaration> + <field> + <name>value</name> + <type>text</type> + <notnull>true</notnull> + <length>100000</length> + </field> + </declaration> + </table> +</database> diff --git a/tests/lib/DB/schemDiffData/core.xml b/tests/lib/DB/schemDiffData/core.xml new file mode 100644 index 00000000000..3775eb6cb37 --- /dev/null +++ b/tests/lib/DB/schemDiffData/core.xml @@ -0,0 +1,1347 @@ +<?xml version="1.0" encoding="utf-8" ?> +<database> + + <table> + + <!-- + Namespaced Key-Value Store for Application Configuration. + - Keys are namespaced per appid. + - E.g. (core, global_cache_gc_lastrun) -> 1385463286 + --> + <name>*dbprefix*appconfig</name> + + <declaration> + + <field> + <name>appid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>32</length> + </field> + + <field> + <name>configkey</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>configvalue</name> + <type>clob</type> + <notnull>false</notnull> + </field> + </declaration> + + </table> + + <table> + + <!-- + Bidirectional Map for Storage Names and Storage Ids. + - Assigns each storage name a unique storage id integer. + - Long storage names are hashed. + - E.g. local::/tmp/ <-> 2 + - E.g. b5db994aa8c6625100e418406c798269 <-> 27 + --> + <name>*dbprefix*storages</name> + + <declaration> + + <field> + <name>id</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>64</length> + </field> + + <field> + <name>numeric_id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <length>4</length> + </field> + + <field> + <name>available</name> + <type>integer</type> + <default>1</default> + <notnull>true</notnull> + </field> + + <field> + <name>last_checked</name> + <type>integer</type> + </field> + </declaration> + + </table> + + <!-- a list of all mounted storage per user, populated on filesystem setup --> + <table> + + <name>*dbprefix*mounts</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <length>4</length> + </field> + + <field> + <name>storage_id</name> + <type>integer</type> + <notnull>true</notnull> + </field> + + <!-- fileid of the root of the mount, foreign key: oc_filecache.fileid --> + <field> + <name>root_id</name> + <type>integer</type> + <notnull>true</notnull> + </field> + + <field> + <name>user_id</name> + <type>text</type> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>mount_point</name> + <type>text</type> + <notnull>true</notnull> + <length>4000</length> + </field> + + + </declaration> + + </table> + + <table> + + <!-- + Bidirectional Map for Mimetypes and Mimetype Id + - Assigns each mimetype (and supertype) a unique mimetype id integer. + - E.g. application <-> 5 + - E.g. application/pdf <-> 6 + --> + <name>*dbprefix*mimetypes</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <length>4</length> + </field> + + <field> + <name>mimetype</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + </declaration> + + </table> + + <table> + + <!-- + Main file table containing one row for each directory and file. + - Assigns a unique integer fileid to each file (and directory) + - Assigns an etag to each file (and directory) + - Caches various file/dir properties such as: + - path (filename, e.g. files/combinatoricslib-2.0_doc.zip) + - path_hash = md5(path) + - name (basename, e.g. combinatoricslib-2.0_doc.zip) + - size (for directories this is the sum of all contained file sizes) + --> + <name>*dbprefix*filecache</name> + + <declaration> + + <field> + <name>fileid</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <length>4</length> + </field> + + <!-- Foreign Key storages::numeric_id --> + <field> + <name>storage</name> + <type>integer</type> + <default></default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>path</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>4000</length> + </field> + + <field> + <name>path_hash</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>32</length> + </field> + + <!-- Foreign Key filecache::fileid --> + <field> + <name>parent</name> + <type>integer</type> + <default></default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>name</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>250</length> + </field> + + <!-- Foreign Key mimetypes::id --> + <field> + <name>mimetype</name> + <type>integer</type> + <default></default> + <notnull>true</notnull> + <length>4</length> + </field> + + <!-- Foreign Key mimetypes::id --> + <field> + <name>mimepart</name> + <type>integer</type> + <default></default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>size</name> + <type>integer</type> + <default></default> + <notnull>true</notnull> + <length>8</length> + </field> + + <field> + <name>mtime</name> + <type>integer</type> + <default></default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>storage_mtime</name> + <type>integer</type> + <default></default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>encrypted</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>unencrypted_size</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>8</length> + </field> + + <field> + <name>etag</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>40</length> + </field> + + <field> + <name>permissions</name> + <type>integer</type> + <default>0</default> + <notnull>false</notnull> + <length>4</length> + </field> + + <field> + <name>checksum</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>255</length> + </field> + + + + </declaration> + + </table> + + <table> + + <!-- + Stores which groups have which users as members in an n:m relationship. + - Maps group id (gid) to a set of users (uid) + - Maps user id (uid) to a set of groups (gid) (but without index) + --> + <name>*dbprefix*group_user</name> + + <declaration> + + <!-- Foreign Key groups::gid --> + <field> + <name>gid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <!-- Foreign Key users::uid --> + <field> + <name>uid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + </declaration> + + </table> + + <table> + + <!-- + Stores which groups have which users as admins in an n:m relationship. + - Maps group id (gid) to a set of users (uid) + - Maps user id (uid) to a set of groups (gid) + + NOTE: This could (very likely) be reduced to a single bit in group_user + instead of repeating varchars gid and uid here + --> + <name>*dbprefix*group_admin</name> + + <declaration> + + <!-- Foreign Key groups::gid --> + <field> + <name>gid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <!-- Foreign Key users::uid --> + <field> + <name>uid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + </declaration> + + </table> + + <table> + + <!-- + A simple list of groups. + --> + <name>*dbprefix*groups</name> + + <declaration> + + <field> + <name>gid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + </declaration> + + </table> + + <table> + + <!-- + Namespaced Key-Value Store for User Preferences + - Keys are namespaced per userid and appid. + - E.g. (admin, files, cache_version) -> 5 + --> + <name>*dbprefix*preferences</name> + + <declaration> + + <!-- Foreign Key users::uid --> + <field> + <name>userid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>appid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>32</length> + </field> + + <field> + <name>configkey</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>configvalue</name> + <type>clob</type> + <notnull>false</notnull> + </field> + + </declaration> + + </table> + + <table> + + <!-- + WebDAV properties. + --> + <name>*dbprefix*properties</name> + + <declaration> + + <field> + <name>id</name> + <autoincrement>1</autoincrement> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>4</length> + </field> + + <!-- Foreign Key users::uid --> + <field> + <name>userid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>propertypath</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + <field> + <name>propertyname</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + <field> + <name>propertyvalue</name> + <type>text</type> + <notnull>true</notnull> + <length>255</length> + </field> + + </declaration> + + </table> + + <table> + + <!-- + Shares of all types (user-to-user, external-via-link, etc.) + --> + <name>*dbprefix*share</name> + + <declaration> + + <field> + <name>id</name> + <autoincrement>1</autoincrement> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>4</length> + </field> + + <!-- Constant OCP\Share::SHARE_TYPE_* --> + <field> + <name>share_type</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>1</length> + </field> + + <!-- Foreign Key users::uid or NULL --> + <field> + <name>share_with</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>255</length> + </field> + + <!-- Foreign Key users::uid --> + <!-- This is the owner of the share + which does not have to be the initiator of the share --> + <field> + <name>uid_owner</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <!-- Foreign Key users::uid --> + <!-- This is the initiator of the share --> + <field> + <name>uid_initiator</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>64</length> + </field> + + + + <!-- Foreign Key share::id or NULL --> + <field> + <name>parent</name> + <type>integer</type> + <notnull>false</notnull> + <length>4</length> + </field> + + <!-- E.g. file or folder --> + <field> + <name>item_type</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <!-- Foreign Key filecache::fileid --> + <field> + <name>item_source</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>255</length> + </field> + + <field> + <name>item_target</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>255</length> + </field> + + <!-- Foreign Key filecache::fileid --> + <field> + <name>file_source</name> + <type>integer</type> + <notnull>false</notnull> + <length>4</length> + </field> + + <field> + <name>file_target</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>512</length> + </field> + + <!-- Permission bitfield --> + <field> + <name>permissions</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>1</length> + </field> + + <!-- Time of share creation --> + <field> + <name>stime</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>8</length> + </field> + + <!-- Whether the receiver accepted the share, if share_with is set. --> + <field> + <name>accepted</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>1</length> + </field> + + <!-- Time of share expiration --> + <field> + <name>expiration</name> + <type>timestamp</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <name>token</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>32</length> + </field> + + <field> + <name>mail_send</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>1</length> + </field> + + </declaration> + + </table> + + <table> + + <!-- + Scheduled background jobs. + See OC\BackgroundJob\JobList. + --> + <name>*dbprefix*jobs</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <field> + <name>class</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + <field> + <name>argument</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>4000</length> + </field> + + <field> + <!-- timestamp when the job was executed the last time --> + <name>last_run</name> + <type>integer</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <!-- timestamp when the job was checked if it needs execution the last time --> + <name>last_checked</name> + <type>integer</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <!-- timestamp when the job was reserved the last time, 1 day timeout --> + <name>reserved_at</name> + <type>integer</type> + <default></default> + <notnull>false</notnull> + </field> + + </declaration> + + </table> + + <table> + + <!-- + List of usernames, their display name and login password. + --> + <name>*dbprefix*users</name> + + <declaration> + + <field> + <name>uid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>displayname</name> + <type>text</type> + <default></default> + <length>64</length> + </field> + + <field> + <name>password</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + + </declaration> + + </table> + + <table> + <name>*dbprefix*authtoken</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <!-- Foreign Key users::uid --> + <field> + <name>uid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>login_name</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>password</name> + <type>clob</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <name>name</name> + <type>clob</type> + <default></default> + <notnull>true</notnull> + </field> + + <field> + <name>token</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>200</length> + </field> + + <field> + <name>type</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>2</length> + </field> + + <field> + <name>last_activity</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + </declaration> + </table> + + <table> + + <!-- + List of tags (category) + a unique tag id (id) per user (uid) and type. + --> + <name>*dbprefix*vcategory</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <!-- Foreign Key users::uid --> + <field> + <name>uid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>type</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>category</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + </declaration> + </table> + + <table> + + <!-- + Object-Tag associations per tag type. + --> + <name>*dbprefix*vcategory_to_object</name> + + <declaration> + + <field> + <name>objid</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <!-- Foreign Key vcategory::id --> + <field> + <name>categoryid</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <field> + <name>type</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + </declaration> + + </table> + + <table> + <!-- + List of system-wide tags + --> + <name>*dbprefix*systemtag</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <!-- Tag name --> + <field> + <name>name</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <!-- Visibility: 0 user-not-visible, 1 user-visible --> + <field> + <name>visibility</name> + <type>integer</type> + <default>1</default> + <notnull>true</notnull> + <length>1</length> + </field> + + <!-- Editable: 0 user-not-editable, 1 user-editable --> + <field> + <name>editable</name> + <type>integer</type> + <default>1</default> + <notnull>true</notnull> + <length>1</length> + </field> + + </declaration> + </table> + + <table> + + <!-- + System tag to object associations per object type. + --> + <name>*dbprefix*systemtag_object_mapping</name> + + <declaration> + + <!-- object id (ex: file id for files)--> + <field> + <name>objectid</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <!-- object type (ex: "files")--> + <field> + <name>objecttype</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <!-- Foreign Key systemtag::id --> + <field> + <name>systemtagid</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + + </declaration> + + </table> + + <table> + + <!-- + System tag to group mapping + --> + <name>*dbprefix*systemtag_group</name> + + <declaration> + + <!-- Foreign Key systemtag::id --> + <field> + <name>systemtagid</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <field> + <name>gid</name> + <type>string</type> + <notnull>true</notnull> + </field> + + </declaration> + + </table> + + <table> + + <!-- + Namespaced Key-Value Store for arbitrary data. + - Keys are namespaced per userid and appid. + - E.g. (admin, files, foo) -> bar + --> + <name>*dbprefix*privatedata</name> + + <declaration> + + <field> + <name>keyid</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + <autoincrement>1</autoincrement> + </field> + + <!-- Foreign Key users::uid --> + <field> + <name>user</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>app</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + <field> + <name>key</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + <field> + <name>value</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + </declaration> + + </table> + + <table> + + <!-- + Table for storing transactional file locking + --> + <name>*dbprefix*file_locks</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + <autoincrement>1</autoincrement> + </field> + + <field> + <name>lock</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>key</name> + <type>text</type> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>ttl</name> + <type>integer</type> + <default>-1</default> + <notnull>true</notnull> + <length>4</length> + </field> + + </declaration> + + </table> + + <table> + <!-- + default place to store comment data + --> + <name>*dbprefix*comments</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + <autoincrement>1</autoincrement> + </field> + + <field> + <name>parent_id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <field> + <name>topmost_parent_id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <field> + <name>children_count</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <field> + <name>actor_type</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>actor_id</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>message</name> + <type>clob</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <name>verb</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>64</length> + </field> + + <field> + <name>creation_timestamp</name> + <type>timestamp</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <name>latest_child_timestamp</name> + <type>timestamp</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <name>object_type</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>object_id</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + </declaration> + + </table> + + <table> + <!-- + default place to store per user and object read markers + --> + <name>*dbprefix*comments_read_markers</name> + + <declaration> + + <field> + <name>user_id</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>marker_datetime</name> + <type>timestamp</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <name>object_type</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>object_id</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>64</length> + </field> + + </declaration> + + </table> + + <table> + <!-- + Encrypted credentials storage + --> + <name>*dbprefix*credentials</name> + + <declaration> + + <field> + <name>user</name> + <type>text</type> + <default></default> + <notnull>false</notnull> + <length>64</length> + </field> + + <field> + <name>identifier</name> + <type>text</type> + <notnull>true</notnull> + <length>64</length> + </field> + + <field> + <name>credentials</name> + <type>clob</type> + <notnull>false</notnull> + </field> + + </declaration> + + </table> + +</database> diff --git a/tests/lib/DB/schemDiffData/default-1.xml b/tests/lib/DB/schemDiffData/default-1.xml new file mode 100644 index 00000000000..39b95a1f273 --- /dev/null +++ b/tests/lib/DB/schemDiffData/default-1.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8" ?> +<database> + + <table> + + <!-- + Table for storing transactional file locking + --> + <name>*dbprefix*file_locks</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <unsigned>true</unsigned> + <length>4</length> + <autoincrement>1</autoincrement> + </field> + + <field> + <name>lock</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <length>4</length> + </field> + + <field> + <name>key</name> + <type>text</type> + <notnull>true</notnull> + <default>(stupid text)</default> + <length>64</length> + </field> + + <field> + <name>ttl</name> + <type>integer</type> + <default>-1</default> + <notnull>true</notnull> + <length>4</length> + </field> + + </declaration> + + </table> + +</database> diff --git a/tests/lib/DB/schemDiffData/unsigned.xml b/tests/lib/DB/schemDiffData/unsigned.xml new file mode 100644 index 00000000000..e89fd6a5d4e --- /dev/null +++ b/tests/lib/DB/schemDiffData/unsigned.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="utf-8" ?> +<database> + + <table> + + <!-- + Scheduled background jobs. + See OC\BackgroundJob\JobList. + --> + <name>*dbprefix*jobs</name> + + <declaration> + + <field> + <name>id</name> + <type>integer</type> + <default>0</default> + <notnull>true</notnull> + <autoincrement>1</autoincrement> + <unsigned>true</unsigned> + <length>4</length> + </field> + + <field> + <name>class</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>255</length> + </field> + + <field> + <name>argument</name> + <type>text</type> + <default></default> + <notnull>true</notnull> + <length>4000</length> + </field> + + <field> + <!-- timestamp when the job was executed the last time --> + <name>last_run</name> + <type>integer</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <!-- timestamp when the job was checked if it needs execution the last time --> + <name>last_checked</name> + <type>integer</type> + <default></default> + <notnull>false</notnull> + </field> + + <field> + <!-- timestamp when the job was reserved the last time, 1 day timeout --> + <name>reserved_at</name> + <type>integer</type> + <default></default> + <notnull>false</notnull> + </field> + + </declaration> + + </table> + +</database> |