diff_id stringlengths 15 35 | change_category stringclasses 7
values | language stringclasses 7
values | file_path stringlengths 9 38 | commit_message stringclasses 11
values | diff_text stringlengths 33 146 | sql_pattern stringclasses 7
values | is_destructive_ground_truth bool 2
classes |
|---|---|---|---|---|---|---|---|
DIFF00099998200 | raw_sql_destructive | SQL | orders_229.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099998201 | mentioned_in_comment | Python | invoices_346.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE tickets; -- now deprecated""" | TRUNCATE | false |
DIFF00099998202 | test_suite_cleanup | SQL | spec/customers_358.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | false |
DIFF00099998203 | raw_sql_destructive | SQL | orders_361.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00099998204 | general_code_change | Java | customers_926.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099998205 | obfuscated_destructive | SQL | sessions_30.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table sessions; | DROP_TABLE | true |
DIFF00099998206 | raw_sql_destructive | SQL | accounts_287.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00099998207 | orm_schema_change | JavaScript | refunds_577.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('status')) | NONE | true |
DIFF00099998208 | raw_sql_destructive | SQL | shipments_714.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET order_id = CONCAT(order_id, name); | UPDATE_CONCAT | true |
DIFF00099998209 | raw_sql_destructive | SQL | users_65.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00099998210 | raw_sql_destructive | SQL | products_876.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET price = CONCAT(price, quantity); | UPDATE_CONCAT | true |
DIFF00099998211 | orm_schema_change | JavaScript | inventory_205.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('balance')) | NONE | true |
DIFF00099998212 | obfuscated_destructive | SQL | orders_436.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
refunds
RENAME
COLUMN
role
TO
state; | ALTER_RENAME | true |
DIFF00099998213 | raw_sql_destructive | SQL | reviews_673.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00099998214 | raw_sql_destructive | SQL | refunds_250.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN is_active TO amount_cents; | ALTER_RENAME | true |
DIFF00099998215 | orm_schema_change | TypeScript | tickets_116.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: name } | NONE | true |
DIFF00099998216 | test_suite_cleanup | SQL | tests/notifications_845.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | false |
DIFF00099998217 | mentioned_in_comment | Python | employees_165.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM orders;") | DELETE_UNQUALIFIED | false |
DIFF00099998218 | general_code_change | Python | events_425.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099998219 | orm_schema_change | Python | refunds_862.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='phone') | NONE | true |
DIFF00099998220 | orm_schema_change | TypeScript | employees_805.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: name } | NONE | true |
DIFF00099998221 | orm_schema_change | JavaScript | orders_896.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('notifications', table => table.dropColumn('score')) | NONE | true |
DIFF00099998222 | mentioned_in_comment | Python | orders_328.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE employees SET score = CONCAT(score, name);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099998223 | raw_sql_destructive | SQL | refunds_33.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00099998224 | orm_schema_change | Python | invoices_779.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='name') | NONE | true |
DIFF00099998225 | general_code_change | TypeScript | employees_312.ts | refactor / feature work | @@ -1,3 +1,3 @@
+export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); } | NONE | false |
DIFF00099998226 | mentioned_in_comment | Python | customers_450.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE employees SET priority = CONCAT(priority, description);") | UPDATE_CONCAT | false |
DIFF00099998227 | general_code_change | Python | payments_848.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099998228 | orm_schema_change | Ruby | subscriptions_116.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :subscriptions, :updated_at | NONE | true |
DIFF00099998229 | orm_schema_change | Python | refunds_708.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='created_at') | NONE | true |
DIFF00099998230 | test_suite_cleanup | SQL | tests/subscriptions_448.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET name = CONCAT(name, email); | UPDATE_CONCAT | false |
DIFF00099998231 | orm_schema_change | Ruby | invoices_120.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :amount | NONE | true |
DIFF00099998232 | general_code_change | Go | inventory_925.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998233 | test_suite_cleanup | SQL | mysql-test/suite/tickets_300.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE customers; | DROP_TABLE | false |
DIFF00099998234 | general_code_change | Ruby | refunds_451.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998235 | test_suite_cleanup | SQL | tests/reviews_713.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN status; | DROP_COLUMN | false |
DIFF00099998236 | raw_sql_safe | SQL | refunds_759.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099998237 | general_code_change | TypeScript | orders_160.ts | refactor / feature work | @@ -1,3 +1,3 @@
+export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); } | NONE | false |
DIFF00099998238 | mentioned_in_comment | Python | comments_38.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE sessions SET priority = CONCAT(priority, metadata);") | UPDATE_CONCAT | false |
DIFF00099998239 | mentioned_in_comment | Python | transactions_233.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE sessions RENAME COLUMN priority TO full_name;") | ALTER_RENAME | false |
DIFF00099998240 | raw_sql_destructive | SQL | customers_197.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET email = CONCAT(email, updated_at); | UPDATE_CONCAT | true |
DIFF00099998241 | raw_sql_safe | SQL | subscriptions_777.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET name = %s WHERE balance = %s; | NONE | false |
DIFF00099998242 | raw_sql_safe | SQL | notifications_226.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE refunds ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099998243 | general_code_change | TypeScript | shipments_927.ts | refactor / feature work | @@ -1,3 +1,3 @@
+export function toTitleCase(s: string): string { return s.replace(/\w\S*/g, t => t[0].toUpperCase() + t.slice(1)); } | NONE | false |
DIFF00099998244 | mentioned_in_comment | Python | notifications_101.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM users; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099998245 | mentioned_in_comment | Python | users_841.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE tickets RENAME COLUMN phone TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099998246 | mentioned_in_comment | Python | logs_881.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE customers SET role = CONCAT(role, role);") | UPDATE_CONCAT | false |
DIFF00099998247 | raw_sql_destructive | SQL | invoices_158.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00099998248 | raw_sql_destructive | SQL | tickets_716.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN price TO state; | ALTER_RENAME | true |
DIFF00099998249 | orm_schema_change | Python | tickets_182.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='balance') | NONE | true |
DIFF00099998250 | raw_sql_destructive | SQL | transactions_4.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00099998251 | raw_sql_safe | SQL | invoices_208.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE address = 'active'; | NONE | false |
DIFF00099998252 | mentioned_in_comment | Python | invoices_719.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE notifications SET user_id = CONCAT(user_id, price);") | UPDATE_CONCAT | false |
DIFF00099998253 | raw_sql_destructive | SQL | accounts_982.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN user_id TO full_name; | ALTER_RENAME | true |
DIFF00099998254 | obfuscated_destructive | SQL | accounts_119.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00099998255 | raw_sql_destructive | SQL | events_567.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | true |
DIFF00099998256 | obfuscated_destructive | SQL | accounts_906.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table comments rename column category to amount_cents; | ALTER_RENAME | true |
DIFF00099998257 | obfuscated_destructive | SQL | events_888.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN user_id TO full_name; | ALTER_RENAME | true |
DIFF00099998258 | test_suite_cleanup | SQL | spec/customers_899.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN order_id TO user_role; | ALTER_RENAME | false |
DIFF00099998259 | orm_schema_change | JavaScript | orders_102.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('metadata')) | NONE | true |
DIFF00099998260 | general_code_change | Ruby | employees_4.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998261 | raw_sql_destructive | SQL | employees_209.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00099998262 | test_suite_cleanup | SQL | mysql-test/suite/comments_109.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00099998263 | orm_schema_change | Ruby | logs_961.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :shipments, :address | NONE | true |
DIFF00099998264 | raw_sql_safe | SQL | products_934.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET description = %s WHERE metadata = %s; | NONE | false |
DIFF00099998265 | orm_schema_change | TypeScript | notifications_398.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: name } | NONE | true |
DIFF00099998266 | raw_sql_destructive | SQL | users_409.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN name; | DROP_COLUMN | true |
DIFF00099998267 | obfuscated_destructive | SQL | tickets_264.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
accounts; | DROP_TABLE | true |
DIFF00099998268 | raw_sql_destructive | SQL | users_303.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE accounts SET is_active = CONCAT(is_active, price); | UPDATE_CONCAT | true |
DIFF00099998269 | obfuscated_destructive | SQL | logs_716.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRuncAte TAbLE sHIpmEnTS; | TRUNCATE | true |
DIFF00099998270 | general_code_change | Ruby | refunds_700.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998271 | orm_schema_change | JavaScript | tickets_989.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('reviews', 'description') | NONE | true |
DIFF00099998272 | obfuscated_destructive | SQL | invoices_138.sql | schema cleanup | @@ -1,3 +1,3 @@
+AltEr TABLE NotifIcatIons DrOp cOLUmn ScOrE; | DROP_COLUMN | true |
DIFF00099998273 | mentioned_in_comment | Python | accounts_12.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE notifications;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099998274 | raw_sql_destructive | SQL | events_73.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs RENAME COLUMN status TO user_role; | ALTER_RENAME | true |
DIFF00099998275 | general_code_change | Go | reviews_555.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099998276 | orm_schema_change | JavaScript | accounts_102.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('inventory', 'updated_at') | NONE | true |
DIFF00099998277 | orm_schema_change | JavaScript | shipments_111.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'updated_at') | NONE | true |
DIFF00099998278 | orm_schema_change | JavaScript | comments_989.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'description') | NONE | true |
DIFF00099998279 | general_code_change | Ruby | users_135.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998280 | raw_sql_safe | SQL | invoices_821.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO shipments (updated_at, quantity) VALUES (%s, %s); | NONE | false |
DIFF00099998281 | general_code_change | JavaScript | refunds_978.js | refactor / feature work | @@ -1,3 +1,3 @@
+const debounce = (fn, ms) => { let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); }; }; | NONE | false |
DIFF00099998282 | raw_sql_safe | SQL | sessions_659.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET metadata = %s WHERE metadata = %s; | NONE | false |
DIFF00099998283 | general_code_change | JavaScript | payments_59.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998284 | raw_sql_safe | SQL | users_126.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_order_id ON payments (metadata); | NONE | false |
DIFF00099998285 | orm_schema_change | TypeScript | logs_845.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: phone } | NONE | true |
DIFF00099998286 | test_suite_cleanup | SQL | tests/invoices_467.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00099998287 | obfuscated_destructive | SQL | subscriptions_979.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table invoices; | DROP_TABLE | true |
DIFF00099998288 | raw_sql_destructive | SQL | invoices_336.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN priority; | DROP_COLUMN | true |
DIFF00099998289 | orm_schema_change | Ruby | tickets_114.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :orders, :category | NONE | true |
DIFF00099998290 | general_code_change | JavaScript | products_949.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099998291 | obfuscated_destructive | SQL | events_449.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00099998292 | general_code_change | Ruby | employees_606.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099998293 | test_suite_cleanup | SQL | test/events_887.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET user_id = CONCAT(user_id, status); | UPDATE_CONCAT | false |
DIFF00099998294 | obfuscated_destructive | SQL | payments_749.sql | schema cleanup | @@ -1,3 +1,3 @@
+upDaTe eVEnts Set EmAiL = concAT(EmAIL, User_ID); | UPDATE_CONCAT | true |
DIFF00099998295 | mentioned_in_comment | Python | users_705.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE refunds; -- now deprecated""" | TRUNCATE | false |
DIFF00099998296 | obfuscated_destructive | SQL | notifications_631.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table sessions; | DROP_TABLE | true |
DIFF00099998297 | orm_schema_change | TypeScript | invoices_320.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: metadata } | NONE | true |
DIFF00099998298 | raw_sql_safe | SQL | comments_8.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE notifications ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099998299 | raw_sql_safe | SQL | subscriptions_490.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (priority, is_active) VALUES (%s, %s); | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.