Database

We use InnoDB with foreign key constraints. All foreign keys are colored lines(not the black one) in this model:

auth_assignment

Yii2 table. Global rights assignment for users

auth_item

Yii2 table. All single rights, that belong either to admin or to user.

auth_item_child

Yii2 table. Assign single rights to Global rights and User to admin.

auth_rule

Yii2 table. Rules that give rights dynamically. Used for userroles in teams.

screenplay

Table for all screenplays.

screenplay_comment

Table for comments.

screenplay_revision

Table for screenplay revisions. A revision includes a tree and a text revision.

screenplay_text_revision

Table for screenplay text revisions.

screenplay_tree_revision

Table for screenplay tree revisions.

setting

Table for global site settings.

team

Table for teams. A team is a group of users that work on the same screenplays. Every user has a specific role (see team_user)

team_user

Assignment team to user.

user

Table for users.

user_mail_token

Tokens send in activation mails.