一键导入
flyway-migrations
Flyway SQL migration patterns for Xeres including naming conventions, H2 database patterns, enum types, foreign keys, and best practices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Flyway SQL migration patterns for Xeres including naming conventions, H2 database patterns, enum types, foreign keys, and best practices.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Gradle build configuration for Xeres including build commands, version management, module structure, and key plugins.
JUnit 6 testing patterns for Xeres including Mockito with constructor injection, test fixtures via *Fakes.java classes, and AssertJ assertions.
ArchUnit architecture rules enforced in Xeres including common module rules (logging, utility classes), app module rules (no field injection, RsService naming), and UI module rules (WindowController naming).
Cryptography patterns for Xeres including PGP operations, key generation, and hash functions with best practices.
DTO and mapper patterns for Xeres using Java records, canonical constructors with validation, and static mapper utility classes.
Code style, naming conventions, license headers, and patterns for Xeres Java project. Covers Allman braces, utility classes, package structure, and field injection rules.
| name | flyway-migrations |
| description | Flyway SQL migration patterns for Xeres including naming conventions, H2 database patterns, enum types, foreign keys, and best practices. |
app/src/main/resources/db/migration/
V<major>_<minor>_<timestamp>__<description>.sql
Examples:
V00_0_1_202001232214__InitDb.sqlV00_0_32_202603092327__AddIndices.sqlCREATE TABLE profile (
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name VARCHAR(255) NOT NULL,
pgp_id BIGINT,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT profile_pkey PRIMARY KEY (id)
);
CREATE INDEX idx_profile_name ON profile(name);
CREATE TYPE trust_level AS ENUM ('UNKNOWN', 'NEVER', 'MARGINAL', 'FULLY', 'ULTIMATE');
ALTER TABLE profile ADD COLUMN trust trust_level NOT NULL DEFAULT 'UNKNOWN';
ALTER TABLE contact
ADD CONSTRAINT fk_contact_profile
FOREIGN KEY (profile_id) REFERENCES profile(id)
ON DELETE CASCADE;
BIGINT for IDs with GENERATED BY DEFAULT AS IDENTITYNOT NULL constraints where appropriateAdd downward migrations with V<version>__<name>.sql (no timestamp):
-- V00_0_33__AddLocations.sql
ALTER TABLE location DROP COLUMN IF EXISTS last_seen;
Flyway runs automatically on application startup with H2 database.