diff --git a/mateclaw-server/src/main/resources/db/migration/kingbase/V117__skill_lifecycle.sql b/mateclaw-server/src/main/resources/db/migration/kingbase/V117__skill_lifecycle.sql index 01353e19..4416fd34 100644 --- a/mateclaw-server/src/main/resources/db/migration/kingbase/V117__skill_lifecycle.sql +++ b/mateclaw-server/src/main/resources/db/migration/kingbase/V117__skill_lifecycle.sql @@ -6,7 +6,7 @@ -- pinned SMALLINT. ALTER TABLE mate_skill ADD COLUMN IF NOT EXISTS lifecycle_state VARCHAR(16) DEFAULT 'active'; -ALTER TABLE mate_skill ADD COLUMN IF NOT EXISTS pinned SMALLINT DEFAULT 0; +ALTER TABLE mate_skill ADD COLUMN IF NOT EXISTS pinned BOOLEAN DEFAULT FALSE; ALTER TABLE mate_skill ADD COLUMN IF NOT EXISTS archived_at TIMESTAMP(3) NULL; ALTER TABLE mate_skill ADD COLUMN IF NOT EXISTS last_activity_at TIMESTAMP(3) NULL; diff --git a/mateclaw-server/src/main/resources/db/migration/kingbase/V126__agent_binding_disabled_flags.sql b/mateclaw-server/src/main/resources/db/migration/kingbase/V126__agent_binding_disabled_flags.sql index d93c5d47..adabf996 100644 --- a/mateclaw-server/src/main/resources/db/migration/kingbase/V126__agent_binding_disabled_flags.sql +++ b/mateclaw-server/src/main/resources/db/migration/kingbase/V126__agent_binding_disabled_flags.sql @@ -9,5 +9,5 @@ -- -- KingbaseES (PostgreSQL) supports ADD COLUMN IF NOT EXISTS natively. -ALTER TABLE mate_agent ADD COLUMN IF NOT EXISTS skills_disabled SMALLINT NOT NULL DEFAULT 0; -ALTER TABLE mate_agent ADD COLUMN IF NOT EXISTS tools_disabled SMALLINT NOT NULL DEFAULT 0; +ALTER TABLE mate_agent ADD COLUMN IF NOT EXISTS skills_disabled BOOLEAN NOT NULL DEFAULT FALSE; +ALTER TABLE mate_agent ADD COLUMN IF NOT EXISTS tools_disabled BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/mateclaw-server/src/main/resources/db/migration/kingbase/V133__wiki_agent_page_type_permission.sql b/mateclaw-server/src/main/resources/db/migration/kingbase/V133__wiki_agent_page_type_permission.sql index 8a184454..f511f8d3 100644 --- a/mateclaw-server/src/main/resources/db/migration/kingbase/V133__wiki_agent_page_type_permission.sql +++ b/mateclaw-server/src/main/resources/db/migration/kingbase/V133__wiki_agent_page_type_permission.sql @@ -10,10 +10,10 @@ CREATE TABLE IF NOT EXISTS mate_wiki_agent_page_type_permission ( agent_id BIGINT NOT NULL, kb_id BIGINT NOT NULL, page_type VARCHAR(64) NOT NULL, - can_read SMALLINT NOT NULL DEFAULT 1, - can_create SMALLINT NOT NULL DEFAULT 0, - can_update SMALLINT NOT NULL DEFAULT 0, - can_delete SMALLINT NOT NULL DEFAULT 0, + can_read BOOLEAN NOT NULL DEFAULT TRUE, + can_create BOOLEAN NOT NULL DEFAULT FALSE, + can_update BOOLEAN NOT NULL DEFAULT FALSE, + can_delete BOOLEAN NOT NULL DEFAULT FALSE, write_policy VARCHAR(32) NOT NULL DEFAULT 'approval_required', create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, update_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, diff --git a/mateclaw-server/src/main/resources/db/migration/kingbase/V135__wiki_layered_knowledge.sql b/mateclaw-server/src/main/resources/db/migration/kingbase/V135__wiki_layered_knowledge.sql index ec0ea987..c48baebb 100644 --- a/mateclaw-server/src/main/resources/db/migration/kingbase/V135__wiki_layered_knowledge.sql +++ b/mateclaw-server/src/main/resources/db/migration/kingbase/V135__wiki_layered_knowledge.sql @@ -28,7 +28,7 @@ BEGIN SELECT 1 FROM information_schema.columns WHERE table_name = 'mate_wiki_page' AND column_name = 'stale' ) THEN - ALTER TABLE mate_wiki_page ADD COLUMN stale SMALLINT NOT NULL DEFAULT 0; + ALTER TABLE mate_wiki_page ADD COLUMN stale BOOLEAN NOT NULL DEFAULT FALSE; END IF; END $$; diff --git a/mateclaw-server/src/main/resources/db/migration/kingbase/V146__wiki_kb_watcher_enabled.sql b/mateclaw-server/src/main/resources/db/migration/kingbase/V146__wiki_kb_watcher_enabled.sql index d8c64b57..26bd7640 100644 --- a/mateclaw-server/src/main/resources/db/migration/kingbase/V146__wiki_kb_watcher_enabled.sql +++ b/mateclaw-server/src/main/resources/db/migration/kingbase/V146__wiki_kb_watcher_enabled.sql @@ -8,6 +8,6 @@ BEGIN SELECT 1 FROM information_schema.columns WHERE table_name = 'mate_wiki_knowledge_base' AND column_name = 'watcher_enabled' ) THEN - ALTER TABLE mate_wiki_knowledge_base ADD COLUMN watcher_enabled SMALLINT NOT NULL DEFAULT 0; + ALTER TABLE mate_wiki_knowledge_base ADD COLUMN watcher_enabled BOOLEAN NOT NULL DEFAULT FALSE; END IF; END $$;