Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
1.1 KiB
SQL
39 lines
1.1 KiB
SQL
CREATE TABLE IF NOT EXISTS oauthauthdata (
|
|
clientid varchar(26),
|
|
userid varchar(26),
|
|
code varchar(128) NOT NULL,
|
|
expiresin integer,
|
|
createat bigint,
|
|
redirecturi varchar(256),
|
|
state varchar(1024),
|
|
scope varchar(128),
|
|
PRIMARY KEY (code)
|
|
);
|
|
|
|
DO $$
|
|
<<modify_column_type_if_type_is_different>>
|
|
DECLARE
|
|
type_exists boolean := false;
|
|
col_exists boolean := false;
|
|
BEGIN
|
|
SELECT count(*) != 0 INTO col_exists
|
|
FROM information_schema.columns
|
|
WHERE table_name = 'oauthauthdata'
|
|
AND table_schema = current_schema()
|
|
AND column_name = 'state';
|
|
|
|
SELECT count(*) != 0 INTO type_exists
|
|
FROM information_schema.columns
|
|
WHERE table_name = 'oauthauthdata'
|
|
AND table_schema = current_schema()
|
|
AND column_name = 'state'
|
|
AND data_type = 'character varying'
|
|
AND character_maximum_length = 1024;
|
|
|
|
IF col_exists AND NOT type_exists THEN
|
|
ALTER TABLE oauthauthdata ALTER COLUMN state TYPE varchar(1024);
|
|
END IF;
|
|
END modify_column_type_if_type_is_different $$;
|
|
|
|
DROP INDEX IF EXISTS idx_oauthauthdata_client_id;
|