write-upgrade-sql-script

write-upgrade-sql-script is a skill for Claude Code, Codex from jeffsenso/prestashop-skills. It costs 41 tokens per session (1,005 once invoked), scanned A, original, MIT.

A SQL upgrade script for changing existing PrestaShop shops during an upgrade. PrestaShop is an online-shop platform; the script can update its database, default settings, or feature flags, which control whether features are enabled.

In plain words
What is it for?
Use it to add or change database tables, columns, or indexes; update default configuration rows; or change a feature flag for shops upgrading to a target PrestaShop version.
Why use it?
It ensures existing shops receive database or configuration changes that new installations already get automatically.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jeffsenso/prestashop-skills/write-upgrade-sql-script
Any agent
npx skills add jeffsenso/prestashop-skills --skill write-upgrade-sql-script
Clone the repo
git clone --depth 1 https://github.com/jeffsenso/prestashop-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-upgrade-sql-script

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeffsenso/prestashop-skills/write-upgrade-sql-script.svg)](https://agentmods.dev/skills/jeffsenso/prestashop-skills/write-upgrade-sql-script)
Your own site
<a href="https://agentmods.dev/skills/jeffsenso/prestashop-skills/write-upgrade-sql-script"><img src="https://agentmods.dev/badge/skills/jeffsenso/prestashop-skills/write-upgrade-sql-script.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.01005
Opus 5 $0.00020 $0.00502
Sonnet 5 $0.00008 $0.00201
Haiku 4.5 $0.00004 $0.00101

Measured 4d ago against content hash 249c1fbe1491, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

write-upgrade-sql-script scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/prestashop-module-development/ps9-core-ai/Component/Migration/skills/write-upgrade-sql-script/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

write-upgrade-sql-script

Heads-up — cross-repo

Since PrestaShop 9.x, upgrade SQL scripts are not in the core repository. They live in the autoupgrade module: https://github.com/PrestaShop/autoupgrade (see upgrade/sql/{version}.sql). This skill describes what to write; the file lands in autoupgrade. Agents working in core should hand the change off to a maintainer or open the PR against autoupgrade directly.

When to use this skill

Whenever a change merged into core needs an existing shop to apply a database modification at upgrade time. Common cases:

  1. Schema change — new table, new column, new index, type change.
  2. Default fixtures / configuration update — a new row in ps_configuration, a new row in ps_feature_flag, etc., that newly-installed shops get from the XML/install fixtures but existing shops do not.
  3. Feature-flag state transition — promoting a flag from beta to stable and enabling it for existing installs.

A new install reads the install fixtures directly; only upgrading shops need this script.

Instructions

  1. Determine the target PrestaShop version (e.g., 9.1.0).
  2. Open or create upgrade/sql/{version}.sql in the autoupgrade module repo.
  3. Append the SQL needed for your change. Use the section that matches your case below.
  4. Make every statement idempotent — the script may be run more than once and must not error or corrupt data on re-run.

Case (a) — schema change

-- Add column only if it doesn't exist (MySQL 8.0+ supports IF NOT EXISTS on ALTER TABLE ADD COLUMN)
ALTER TABLE `PREFIX_xxx`
    ADD COLUMN IF NOT EXISTS `new_field` INT(11) NOT NULL DEFAULT 0;

-- Create table only if it doesn't exist
CREATE TABLE IF NOT EXISTS `PREFIX_xxx_yyy` (
    `id_xxx` INT(11) UNSIGNED NOT NULL,
    `id_yyy` INT(11) UNSIGNED NOT NULL,
    PRIMARY KEY (`id_xxx`, `id_yyy`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8mb4;

Case (b) — default fixtures / configuration update

-- Insert configuration row only if not present (preserves merchant overrides)
INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`)
SELECT 'PS_NEW_OPTION', '1', NOW(), NOW()
WHERE NOT EXISTS (SELECT 1 FROM `PREFIX_configuration` WHERE `name` = 'PS_NEW_OPTION');

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 79 lines · 41 tokens per session scan A 249c1fbe1491

Subscribe to this mod's changes

write-upgrade-sql-script is a skill published in the GitHub repository jeffsenso/prestashop-skills (5 stars, last pushed 10d ago), licensed MIT. It adds 41 tokens to every session and 1,005 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

dotnet-testing-advanced-testcontainers-nosql

Testcontainers NoSQL 整合測試完整指南。當需要對 MongoDB 或 Redis 進行容器化整合測試時使用。涵蓋 MongoDB 文件操作、Redis 五種資料結構、Collection Fixture 模式。包含 BSON 序列化、索引效能測試、資料隔離策略與容器生命週期管理。 Make sure to use this skill whenever the user mentions Testcontainers MongoDB, Testcontainers Redis, NoSQL integration test, BSON serialization, or Redis data structure…

kevintsengtw/dotnet-testing-agent-skills · 191 tokens

postgres-commit-history-article

Analyze PostgreSQL git commit history between two commit ids and, when valuable DBA/application-developer changes exist, write a Chinese Markdown article for WeChat/公众号 readers with examples checked against SQL tests, docs, or relevant source. Use when the user is inside a PostgreSQL source checkout and provides two…

digoal/blog · 127 tokens

worktree

How to do feature work in this repo with git worktrees via pnpm worktree. Each worktree gets its own branch, its own block of app ports, its own nodemodules, and by default shares the primary checkout's standard local Supabase DB for fast setup; pass --db only when a separate Supabase project/data plane is needed.…

kortix-ai/suna · 173 tokens

055-design-parallel-change

Use when a database schema or data-meaning change needs Parallel Change, including expand, migrate, and contract sequencing for column renames, type or data reinterpretation, large-table backfills, relationship-table changes, enum/status transitions, timezone/default changes, and index or uniqueness changes. This…

jabrena/plinth · 94 tokens

b2c-custom-objects

Store and query custom business data using CustomObjectMgr, OCAPI Data API, and Shopper Custom Objects API. Use this skill whenever the user needs to create, read, update, or search custom object instances, build processing queues with status fields, choose between site-scoped and organization-scoped storage, or query…

SalesforceCommerceCloud/b2c-developer-tooling · 104 tokens

b2c-querying-data

Write efficient data queries in B2C Commerce for products, customers, and orders. Use this skill whenever the user needs to search products on a storefront page, look up customer profiles, query orders, paginate search results, or fix slow category pages. Also use when they ask about performance problems with data…

SalesforceCommerceCloud/b2c-developer-tooling · 108 tokens