database-migrations
Skill0 starsChanged 7 months agoMITView on GitHub
Create and run database migrations in the CQRSTemplate repo. Use when adding tables, columns, or modifying schema.
33 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- JameMy0001/antigravity-skills-hubtheir own version, first seen Oct 2, 2026
- productionx-in/Core-Skillstheir own version, first seen Sep 29, 2026
- lintangknitto/agent-skillstheir own version, first seen Sep 23, 2026
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- MortuisVMain/ai-agent-superpowerstheir own version, first seen Sep 15, 2026
Used with
Projects with it also use deployment-patterns, postgres-patterns and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
InfopibeSkilldeployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
Also in 6 projects that use this
joneqianSkillpostgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
Also in 5 projects that use this
devsforgeSkillbackend-patterns
Expert knowledge in API design, authentication, caching, and backend best practices. Use for backend development tasks.
Also in 8 projects that use this
InfopibeSkillautonomous-loops
Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.
Also in 3 projects that use this
Svenja-devSkille2e-testing
Also in 6 projects that use this
xfstudioSkillpython-patterns
Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying.
Also in 4 projects that use this
- +1 more from Infopibe
Other versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- xu-xiang/everything-claude-code-zh★ 2ksame name
- loulanyue/awesome-claude-notes★ 272same name
- tpavanipradeep/everything-claude-code★ 134same name
- langchain-ai/skills-benchmarks★ 118same name
- templetongroup/radiant★ 113same name
- Jamkris/everything-gemini-code★ 87same name
- skateddu/claude-code-python-setup★ 28same name
- noah-sheldon/ai-dev-kit★ 13same name
- wpank/ai★ 11same name
- vanara-agents/skills★ 9same name
23 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- api-endpoint-creationSkill
- local-dev-testingSkill
- testing-cqrs-securitySkill
- business-rule-additionSkill
- chrome-devtools-expertSkill
- code-reviewSkill
- context7-docsSkill
- domain-scaffoldingSkill
- markitdown-converterSkill
- playwright-automationSkill
- property-additionSkill
- serena-code-generatorSkill
- strategic-plannerSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 30 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 84
Use addField with explicit type constraints
- Very specific: line 85
Always include created_at, updated_at, deleted_at for domain tables
- Very specific: line 86
Use unsigned for ID fields
- Very specific: line 87
Check fieldExists() in up() for idempotent column additions
- Distinctive: line 93
If adding a property to a domain entity, follow the property-addition skill
- Very specific: line 94
Run composer check to verify nothing breaks
“Common” is measured: kept by at least 6 in 10 of the 30 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Database Migrations
Creating a Migration
php spark make:migration <MigrationName>This creates a file in app/Database/Migrations/ with a timestamp prefix.
Migration File Structure
<?php
declare(strict_types=1);
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreateOrdersTable extends Migration
{
public function up(): void
{
$this->forge->addField([
'id' => [
'type' => 'INT',
'constraint' => 11,
'unsigned' => true,
'auto_increment' => true,
],
// ... fields ...
'created_at' => ['type' => 'DATETIME', 'null' => false],
'updated_at' => ['type' => 'DATETIME', 'null' => true],
'deleted_at' => ['type' => 'DATETIME', 'null' => true],
]);
$this->forge->addKey('id', true);
$this->forge->createTable('orders');
}
public function down(): void
{
$this->forge->dropTable('orders');
}
}Adding a Column to an Existing Table
public function up(): void
{
if ($this->db->fieldExists('column_name', 'table_name')) {
return;
}
$this->forge->addColumn('table_name', [
'column_name' => [
'type' => 'VARCHAR',
'constraint' => 100,
'null' => true,
'after' => 'existing_column',
],
]);
}Running Migrations
php spark migrate --all # Run all namespaced migrations
php spark migrate:rollback # Rollback last batch
php spark migrate:status # Check migration statusConventions
- Always use
declare(strict_types=1) - Use
addFieldwith explicit type constraints - Always include
created_at,updated_at,deleted_atfor domain tables - Use
unsignedfor ID fields - Check
fieldExists()inup()for idempotent column additions - Naming:
Create<Table>Table,Add<Column>To<Table>Table
After Creating a Migration
- Run:
php spark migrate --all - If adding a property to a domain entity, follow the property-addition skill
- Run
composer checkto verify nothing breaks
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

