Skip to content
On this page

@deprecated

Postgres Mysql (beta) Sqlite (beta)

Example ​

Input SQL
sql
-- @deprecated('Use user_profiles instead')
-- @deprecated.remove('2025-06-01')
CREATE TABLE user_settings (
  id SERIAL PRIMARY KEY,
  user_id INTEGER NOT NULL,
  theme VARCHAR(20) DEFAULT 'light'
);
Compiled Output
sql
COMMENT ON TABLE "user_settings" IS '@deprecated Use user_profiles instead';

Tags ​

@deprecated ​

Mark this SQL object as deprecated

Targets: table, column, view, function, type

Arguments: No arguments.

@deprecated.replace ​

Mark as deprecated with a replacement suggestion

Targets: table, column, view, function, type

Arguments:Positional: string

@deprecated.remove ​

Mark as deprecated with a scheduled removal date

Targets: table, column, view, function, type

Arguments:Positional: string