[
    {
        "dbFullName": "datasquirel",
        "tables": [
            {
                "tableName": "users",
                "fields": [
                    {
                        "fieldName": "first_name",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "last_name",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "uid",
                        "dataType": "UUID",
                        "defaultValueLiteral": "UUID()"
                    },
                    {
                        "fieldName": "email",
                        "dataType": "VARCHAR(200)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "user_type",
                        "dataType": "VARCHAR(20)",
                        "defaultValue": "root"
                    },
                    {
                        "fieldName": "user_priviledge",
                        "dataType": "TINYINT",
                        "defaultValue": "1"
                    },
                    {
                        "fieldName": "username",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "password",
                        "dataType": "VARCHAR(250)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "image",
                        "dataType": "VARCHAR(250)",
                        "defaultValue": "/images/user-preset.png"
                    },
                    {
                        "fieldName": "image_thumbnail",
                        "dataType": "VARCHAR(250)",
                        "defaultValue": "/images/user-preset-thumbnail.png"
                    },
                    {
                        "fieldName": "social_login",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    },
                    {
                        "fieldName": "social_platform",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "social_id",
                        "dataType": "VARCHAR(250)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "mariadb_user",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "mariadb_host",
                        "dataType": "VARCHAR(200)",
                        "defaultValue": "127.0.0.1"
                    },
                    {
                        "fieldName": "mariadb_pass",
                        "dataType": "TEXT"
                    },
                    {
                        "fieldName": "disk_usage_in_mb",
                        "dataType": "BIGINT",
                        "defaultValue": "0"
                    },
                    {
                        "fieldName": "verification_status",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    }
                ]
            },
            {
                "tableName": "mariadb_users",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "mariadb_users_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "username",
                        "dataType": "VARCHAR(50)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "host",
                        "dataType": "VARCHAR(200)",
                        "defaultValue": "127.0.0.1"
                    },
                    {
                        "fieldName": "password",
                        "dataType": "TEXT"
                    },
                    {
                        "fieldName": "primary",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    },
                    {
                        "fieldName": "grants",
                        "dataType": "LONGTEXT"
                    }
                ]
            },
            {
                "tableName": "api_keys",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "api_keys_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "name",
                        "dataType": "VARCHAR(250)"
                    },
                    {
                        "fieldName": "slug",
                        "dataType": "VARCHAR(250)"
                    },
                    {
                        "fieldName": "key",
                        "dataType": "MEDIUMTEXT"
                    },
                    {
                        "fieldName": "scope",
                        "dataType": "VARCHAR(100)",
                        "defaultValue": "readOnly"
                    },
                    {
                        "fieldName": "csrf",
                        "dataType": "MEDIUMTEXT"
                    }
                ]
            },
            {
                "tableName": "invitations",
                "fields": [
                    {
                        "fieldName": "inviting_user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "invitations_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "invited_user_email",
                        "dataType": "VARCHAR(250)"
                    },
                    {
                        "fieldName": "invitation_status",
                        "dataType": "VARCHAR(250)",
                        "defaultValue": "Pending"
                    },
                    {
                        "fieldName": "database_access",
                        "dataType": "TEXT"
                    },
                    {
                        "fieldName": "priviledge",
                        "dataType": "VARCHAR(100)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "db_tables_data",
                        "dataType": "TEXT"
                    }
                ]
            },
            {
                "tableName": "user_users",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "user_users_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "invited_user_id",
                        "dataType": "BIGINT",
                        "nullValue": true
                    },
                    {
                        "fieldName": "database",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "database_access",
                        "dataType": "TEXT"
                    },
                    {
                        "fieldName": "first_name",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "last_name",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "email",
                        "dataType": "VARCHAR(200)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "username",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "password",
                        "dataType": "TINYTEXT"
                    },
                    {
                        "fieldName": "phone",
                        "dataType": "VARCHAR(50)"
                    },
                    {
                        "fieldName": "user_type",
                        "dataType": "VARCHAR(20)"
                    },
                    {
                        "fieldName": "user_priviledge",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "image",
                        "dataType": "VARCHAR(250)",
                        "defaultValue": "/images/user-preset.png",
                        "nullValue": true
                    },
                    {
                        "fieldName": "image_thumbnail",
                        "dataType": "VARCHAR(250)",
                        "defaultValue": "/images/user-preset-thumbnail.png",
                        "nullValue": true
                    },
                    {
                        "fieldName": "city",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "state",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "country",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "zip_code",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "address",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "social_login",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    },
                    {
                        "fieldName": "social_platform",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "social_id",
                        "dataType": "VARCHAR(250)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "verification_status",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    },
                    {
                        "fieldName": "more_user_data",
                        "dataType": "TEXT"
                    }
                ],
                "indexes": [
                    {
                        "indexType": "fullText",
                        "indexName": "user_users_database_access_index",
                        "indexTableFields": [
                            { "value": "database_access", "dataType": "TEXT" }
                        ]
                    }
                ]
            },
            {
                "tableName": "delegated_user_tables",
                "fields": [
                    {
                        "fieldName": "delegated_user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "delegated_user_tables_delegated_user_id_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "root_user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "delegated_user_tables_root_user_id_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "database",
                        "dataType": "VARCHAR(200)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "table",
                        "dataType": "VARCHAR(200)"
                    },
                    {
                        "fieldName": "priviledge",
                        "dataType": "VARCHAR(200)"
                    }
                ]
            },
            {
                "tableName": "user_databases",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "user_databases_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "db_name",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "db_slug",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "db_full_name",
                        "dataType": "VARCHAR(150)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "db_image",
                        "dataType": "VARCHAR(250)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "db_description",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "remote_connected",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    },
                    {
                        "fieldName": "remote_connection_type",
                        "dataType": "VARCHAR(20)",
                        "defaultValue": "pull"
                    },
                    {
                        "fieldName": "remote_db_full_name",
                        "dataType": "VARCHAR(200)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "remote_connection_host",
                        "dataType": "VARCHAR(200)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "remote_connection_key",
                        "dataType": "TEXT"
                    },
                    {
                        "fieldName": "active_clone",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    },
                    {
                        "fieldName": "active_clone_parent_db",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "active_data",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    }
                ]
            },
            {
                "tableName": "user_database_tables",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "user_database_tables_users_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "db_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "user_database_tables_user_databases_id_ref",
                            "destinationTableName": "user_databases",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "db_slug",
                        "dataType": "VARCHAR(100)"
                    },
                    {
                        "fieldName": "table_name",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "table_slug",
                        "dataType": "VARCHAR(100)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "table_description",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "child_table",
                        "dataType": "TINYINT",
                        "defaultValue": 0
                    },
                    {
                        "fieldName": "child_table_parent_database",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "child_table_parent_table",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "active_data",
                        "dataType": "TINYINT",
                        "defaultValue": "0"
                    }
                ]
            },
            {
                "tableName": "user_media",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "user_media_users_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "media_name",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "folder",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "media_url",
                        "dataType": "VARCHAR(255)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "media_thumbnail_url",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "media_path",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "media_thumbnail_path",
                        "dataType": "VARCHAR(255)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "media_type",
                        "dataType": "VARCHAR(50)",
                        "nullValue": true
                    },
                    {
                        "fieldName": "width",
                        "dataType": "BIGINT",
                        "nullValue": true
                    },
                    {
                        "fieldName": "height",
                        "dataType": "BIGINT",
                        "nullValue": true
                    },
                    {
                        "fieldName": "size",
                        "dataType": "BIGINT",
                        "nullValue": true
                    },
                    {
                        "fieldName": "private",
                        "dataType": "TINYINT",
                        "defaultValue": 0
                    }
                ]
            },
            {
                "tableName": "delegated_users",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "delegated_users_users_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "delegated_user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "delegated_users_delegated_user_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "permissions",
                        "dataType": "VARCHAR(255)",
                        "defaultValue": "edit"
                    },
                    {
                        "fieldName": "permission_level_code",
                        "dataType": "TINYINT",
                        "defaultValue": 1
                    }
                ]
            },
            {
                "tableName": "unsubscribes",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "nullValue": true
                    },
                    {
                        "fieldName": "email",
                        "dataType": "VARCHAR(255)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "type",
                        "dataType": "VARCHAR(255)",
                        "defaultValue": "alerts"
                    }
                ]
            },
            {
                "tableName": "notifications",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "notifications_users_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "title",
                        "dataType": "VARCHAR(255)",
                        "notNullValue": true
                    },
                    {
                        "fieldName": "message",
                        "dataType": "MEDIUMTEXT"
                    }
                ]
            },
            {
                "tableName": "docs_pages",
                "fields": [
                    {
                        "fieldName": "title",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "slug",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "description",
                        "dataType": "TEXT"
                    },
                    {
                        "fieldName": "content",
                        "dataType": "LONGTEXT"
                    },
                    {
                        "fieldName": "text_content",
                        "dataType": "LONGTEXT"
                    },
                    {
                        "fieldName": "level",
                        "dataType": "TINYINT",
                        "defaultValue": 1
                    },
                    {
                        "fieldName": "page_order",
                        "dataType": "TINYINT",
                        "defaultValue": 1
                    },
                    {
                        "fieldName": "parent_id",
                        "dataType": "BIGINT"
                    }
                ]
            },
            {
                "tableName": "docs_page_extra_links",
                "fields": [
                    {
                        "fieldName": "docs_page_id",
                        "dataType": "BIGINT"
                    },
                    {
                        "fieldName": "title",
                        "dataType": "VARCHAR(255)"
                    },
                    {
                        "fieldName": "description",
                        "dataType": "TEXT"
                    },
                    {
                        "fieldName": "url",
                        "dataType": "VARCHAR(255)"
                    }
                ]
            },
            {
                "tableName": "deleted_api_keys",
                "fields": [
                    {
                        "fieldName": "user_id",
                        "dataType": "BIGINT",
                        "notNullValue": true,
                        "foreignKey": {
                            "foreignKeyName": "del_api_keys_users_table_id_ref",
                            "destinationTableName": "users",
                            "destinationTableColumnName": "id",
                            "cascadeDelete": true
                        }
                    },
                    {
                        "fieldName": "key",
                        "dataType": "TEXT"
                    }
                ]
            },
            {
                "tableName": "servers",
                "fields": [
                    {
                        "fieldName": "server_id",
                        "dataType": "INT"
                    },
                    {
                        "fieldName": "ip",
                        "dataType": "VARCHAR(50)"
                    },
                    {
                        "fieldName": "ssh_user",
                        "dataType": "VARCHAR(50)",
                        "defaultValue": "root"
                    },
                    {
                        "fieldName": "ssh_port",
                        "dataType": "INT",
                        "defaultValue": 22
                    }
                ]
            },
            {
                "tableName": "process_queue",
                "tableFullName": "Process Queue",
                "fields": [
                    {
                        "dataType": "BIGINT",
                        "fieldName": "user_id",
                        "defaultValue": "0"
                    },
                    {
                        "dataType": "VARCHAR(200)",
                        "fieldName": "title"
                    },
                    {
                        "dataType": "VARCHAR(50)",
                        "fieldName": "job_type"
                    },
                    {
                        "dataType": "LONGTEXT",
                        "fieldName": "data",
                        "json": true
                    },
                    {
                        "dataType": "TINYINT",
                        "fieldName": "running",
                        "defaultValue": "0"
                    },
                    {
                        "dataType": "BIGINT",
                        "fieldName": "server_id",
                        "defaultValue": "0"
                    },
                    {
                        "dataType": "TINYINT",
                        "fieldName": "error",
                        "defaultValue": "0"
                    },
                    {
                        "dataType": "TEXT",
                        "fieldName": "error_message"
                    },
                    {
                        "dataType": "TINYINT",
                        "fieldName": "success",
                        "defaultValue": "0"
                    }
                ]
            }
        ]
    }
]
