跳到正文
cccskills
免费在 GitHub 公开

database-migrations

Change persistent models and SQLite/PostgreSQL migrations without breaking existing servers.

中文简介正在准备中。当前显示原文说明。

集成工具PostgreSQL
查看安装方法

包含的文件(3)

  • SKILL.md2.2 KB
  • agents/openai.yaml259 B
  • references/migration-workflow.md322 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Persistence is server-only compatibility work.

Workflow

  1. Find the owning database project and both provider conventions.
  2. Update the model deliberately.
  3. Consider existing rows, nullability, defaults, indexes, uniqueness, and backfills.
  4. Generate matching SQLite and PostgreSQL migrations.
  5. Review generated operations and snapshots.
  6. Test upgrading an existing database, not only creating a new one.
  7. Keep database I/O off frequent gameplay paths.

Do not use database entities as gameplay components or shared transport types. Avoid destructive schema changes unless data loss is explicitly accepted.

Report when migrations were generated but not exercised against both providers.

Provider versions in effect

Central package versions live in Directory.Packages.props; do not assume an older major version from prior work. Both providers are in use, and their majors change behavior independently.

  • EF Core and Microsoft.EntityFrameworkCore.Sqlite.Core are on 10.x, Npgsql.EntityFrameworkCore.PostgreSQL on its own matching major. Confirm the current numbers before writing provider-specific code.
  • EF Core 10 changes several defaults that can silently alter a migration: parameterized collections now use multiple scalar parameters instead of a JSON array, complex-type column names are uniquified, nested complex properties use a full path in the column name, and SQL parameter names are simplified.
  • EF Core 10 also changes ExecuteUpdateAsync to accept a regular lambda, which breaks hand-built expression trees.
  • Microsoft.Data.Sqlite 10 assumes UTC: GetDateTimeOffset on a value without an offset treats it as UTC, GetDateTime with an offset returns UTC, and writing a DateTimeOffset into a REAL column converts to UTC first.
  • EF tools now require --framework for multi-targeted projects.

Because existing servers keep their old schema, a migration that is correct for a fresh database can still fail on upgrade. Review the generated Up/Down operations and the snapshot, and confirm SQLite and PostgreSQL outputs separately.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Implement actions, cooldowns, DoAfter flows, interruption, cancellation, and authoritative completion safely.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new52026年10月19日 更新

Implement privileged commands, admin UI, role checks, audit logs, and safe operational controls.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new52026年10月19日 更新

Plan, verify, implement, and deliver repository work through evidence-backed ownership and quality gates.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new52026年10月19日 更新

Implement replicated appearance data, GenericVisualizer mappings, sprite layers, overlays, and client visual systems.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new52026年10月19日 更新

atmos

免费

Modify atmos simulation, gases, fire, pressure, pipes, devices, UI, and hot paths safely.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new52026年10月19日 更新

audio

免费

Add data-driven audio with correct prediction, audience, resources, attribution, and verification.

中文简介正在准备中。当前显示原文说明。

ArcaneSS14/arcane-new52026年10月19日 更新

查看 ArcaneSS14 的全部技能

报告此技能的问题