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>
34 lines
944 B
SQL
34 lines
944 B
SQL
CREATE TABLE IF NOT EXISTS tokens (
|
|
token VARCHAR(64) PRIMARY KEY,
|
|
createat bigint,
|
|
type VARCHAR(64),
|
|
extra VARCHAR(2048)
|
|
);
|
|
|
|
ALTER TABLE tokens ALTER COLUMN extra TYPE VARCHAR(2048);
|
|
|
|
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 = 'tokens'
|
|
AND table_schema = current_schema()
|
|
AND column_name = 'extra';
|
|
|
|
SELECT count(*) != 0 INTO type_exists
|
|
FROM information_schema.columns
|
|
WHERE table_name = 'tokens'
|
|
AND table_schema = current_schema()
|
|
AND column_name = 'extra'
|
|
AND data_type = 'character varying'
|
|
AND character_maximum_length = 2048;
|
|
|
|
IF col_exists AND NOT type_exists THEN
|
|
ALTER TABLE tokens ALTER COLUMN extra TYPE VARCHAR(2048);
|
|
END IF;
|
|
END modify_column_type_if_type_is_different $$;
|