Skip to content

Administration

Cleopatra Enjeck edited this page Mar 3, 2024 · 5 revisions

Requirements

Database

Your database have to support native json datatype.

OCC

List tables

Return a list of tables as json. You can set a userId to filter for that user. Additionally set --no-shares, if you just want to get the tables that are owned by that user.

occ tables:list [-c|--count] [-s|--no-shares] [--] [<user-id>]

Add table

Creates a table and adds it to the database. Must specify the table's owner (user-id) and title. Can optionally add an emoji and a template, whose structure and data will be used to build the table. Possible templates are todo, members, weight, vacation requests, customers and tutorial.

occ tables:add [-e|--emoji [EMOJI]] [-t|--template [TEMPLATE]] [--] <user-id> <title>

Clean table

Cleans the table's data. Can set --dry to print all wanted changes, but not write anything to the database. tables:clean [-d|--dry]

For legacy data:

tables:legacy:clean [-d|--dry]

Transfer legacy rows

Transfers tables' legacy rows to the new database schema. The argument table-ids holds the IDs of tables for the which data is to be transferred (Can specify multiple IDs, separating each with a comma). Can use the option --all to transfer all tables. The option --delete to delete data from new database structure (if any) before transferring data

tables:legacy:transfer:rows [--all] [--delete [DELETE]] [--] [<table-ids>]

Change table owner

Sets a new owner for a table. Transfers the ownership of the table with ID to the user with user id user-id.

occ tables:owner <ID> <user-id>

Delete table

Deletes a table from the database. The argument ID defines the ID of the table to delete

occ tables:remove <ID>

Update or rename table

Updates a table's title, emoji or archive status.

occ tables:update [-e|--emoji [EMOJI]] [-a|--archived] [--] <ID> <title>

Clone this wiki locally