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 |
|---|---|---|---|---|---|---|---|
DIFF00000004400 | mentioned_in_comment | Python | payments_173.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE customers DROP COLUMN address; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000004401 | orm_schema_change | Python | payments_628.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='email') | NONE | true |
DIFF00000004402 | mentioned_in_comment | Python | events_476.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE events DROP COLUMN user_id;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000004403 | raw_sql_destructive | SQL | users_194.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000004404 | test_suite_cleanup | SQL | spec/comments_385.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | false |
DIFF00000004405 | mentioned_in_comment | Python | notifications_701.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE notifications DROP COLUMN score;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000004406 | raw_sql_safe | SQL | subscriptions_71.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (score, phone) VALUES (%s, %s); | NONE | false |
DIFF00000004407 | obfuscated_destructive | SQL | subscriptions_209.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
refunds; | DELETE_UNQUALIFIED | true |
DIFF00000004408 | orm_schema_change | Python | employees_727.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='shipments', name='metadata') | NONE | true |
DIFF00000004409 | raw_sql_destructive | SQL | invoices_54.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000004410 | general_code_change | TypeScript | inventory_989.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 |
DIFF00000004411 | test_suite_cleanup | SQL | mysql-test/suite/subscriptions_560.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE refunds SET name = CONCAT(name, phone); | UPDATE_CONCAT | false |
DIFF00000004412 | obfuscated_destructive | SQL | subscriptions_764.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from employees; | DELETE_UNQUALIFIED | true |
DIFF00000004413 | test_suite_cleanup | SQL | spec/notifications_56.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN description TO full_name; | ALTER_RENAME | false |
DIFF00000004414 | general_code_change | Go | users_862.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004415 | raw_sql_safe | SQL | employees_720.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_quantity ON comments (order_id); | NONE | false |
DIFF00000004416 | mentioned_in_comment | Python | subscriptions_631.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE payments DROP COLUMN email;") | DROP_COLUMN | false |
DIFF00000004417 | general_code_change | JavaScript | notifications_510.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 |
DIFF00000004418 | orm_schema_change | TypeScript | payments_463.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Shipments { // removed field: status } | NONE | true |
DIFF00000004419 | mentioned_in_comment | Python | transactions_931.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE shipments DROP COLUMN created_at;") | DROP_COLUMN | false |
DIFF00000004420 | raw_sql_safe | SQL | invoices_145.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE tickets SET role = %s WHERE status = %s; | NONE | false |
DIFF00000004421 | general_code_change | JavaScript | invoices_302.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004422 | mentioned_in_comment | Python | orders_883.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM transactions;") | DELETE_UNQUALIFIED | false |
DIFF00000004423 | raw_sql_destructive | SQL | accounts_600.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN status TO amount_cents; | ALTER_RENAME | true |
DIFF00000004424 | general_code_change | Java | events_550.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004425 | mentioned_in_comment | Python | refunds_637.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE events SET score = CONCAT(score, metadata);") | UPDATE_CONCAT | false |
DIFF00000004426 | raw_sql_safe | SQL | accounts_166.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE user_id = 'active'; | NONE | false |
DIFF00000004427 | raw_sql_safe | SQL | transactions_31.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE logs SET email = %s WHERE description = %s; | NONE | false |
DIFF00000004428 | raw_sql_safe | SQL | products_75.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000004429 | general_code_change | JavaScript | logs_743.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004430 | obfuscated_destructive | SQL | invoices_828.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
accounts; | TRUNCATE | true |
DIFF00000004431 | raw_sql_destructive | SQL | payments_756.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET description = CONCAT(description, description); | UPDATE_CONCAT | true |
DIFF00000004432 | orm_schema_change | Python | shipments_15.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='quantity') | NONE | true |
DIFF00000004433 | raw_sql_destructive | SQL | payments_493.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN address TO user_role; | ALTER_RENAME | true |
DIFF00000004434 | obfuscated_destructive | SQL | customers_278.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
inventory; | TRUNCATE | true |
DIFF00000004435 | test_suite_cleanup | SQL | spec/orders_272.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN role; | DROP_COLUMN | false |
DIFF00000004436 | mentioned_in_comment | Python | accounts_841.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE invoices SET amount = CONCAT(amount, created_at);") | UPDATE_CONCAT | false |
DIFF00000004437 | orm_schema_change | TypeScript | sessions_908.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Invoices { // removed field: user_id } | NONE | true |
DIFF00000004438 | general_code_change | Java | tickets_699.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004439 | raw_sql_destructive | SQL | sessions_565.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts DROP COLUMN name; | DROP_COLUMN | true |
DIFF00000004440 | mentioned_in_comment | Python | products_356.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE shipments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000004441 | orm_schema_change | Python | reviews_307.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='score') | NONE | true |
DIFF00000004442 | general_code_change | Python | orders_93.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004443 | raw_sql_safe | SQL | events_596.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_phone ON users (email); | NONE | false |
DIFF00000004444 | orm_schema_change | Python | invoices_190.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='shipments', name='phone') | NONE | true |
DIFF00000004445 | obfuscated_destructive | SQL | subscriptions_386.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLete fRoM REVieWs; | DELETE_UNQUALIFIED | true |
DIFF00000004446 | test_suite_cleanup | SQL | spec/products_335.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE comments; | TRUNCATE | false |
DIFF00000004447 | raw_sql_destructive | SQL | orders_559.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN address TO user_role; | ALTER_RENAME | true |
DIFF00000004448 | general_code_change | JavaScript | accounts_808.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 |
DIFF00000004449 | test_suite_cleanup | SQL | mysql-test/suite/accounts_543.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN user_id TO amount_cents; | ALTER_RENAME | false |
DIFF00000004450 | test_suite_cleanup | SQL | spec/logs_620.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN score; | DROP_COLUMN | false |
DIFF00000004451 | general_code_change | Python | sessions_385.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004452 | orm_schema_change | TypeScript | sessions_897.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: metadata } | NONE | true |
DIFF00000004453 | test_suite_cleanup | SQL | spec/reviews_224.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN category; | DROP_COLUMN | false |
DIFF00000004454 | orm_schema_change | JavaScript | notifications_954.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'is_active') | NONE | true |
DIFF00000004455 | general_code_change | Python | employees_865.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004456 | raw_sql_safe | SQL | invoices_207.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET amount = %s WHERE phone = %s; | NONE | false |
DIFF00000004457 | raw_sql_destructive | SQL | notifications_959.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM notifications; | DELETE_UNQUALIFIED | true |
DIFF00000004458 | general_code_change | Python | comments_47.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000004459 | general_code_change | Go | tickets_148.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004460 | general_code_change | JavaScript | shipments_612.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 |
DIFF00000004461 | raw_sql_destructive | SQL | users_516.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000004462 | test_suite_cleanup | SQL | test/customers_44.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | false |
DIFF00000004463 | raw_sql_destructive | SQL | notifications_827.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000004464 | raw_sql_safe | SQL | payments_253.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO refunds (role, updated_at) VALUES (%s, %s); | NONE | false |
DIFF00000004465 | mentioned_in_comment | Python | orders_200.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE reviews RENAME COLUMN category TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004466 | general_code_change | Go | inventory_352.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004467 | orm_schema_change | Python | shipments_808.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='metadata') | NONE | true |
DIFF00000004468 | orm_schema_change | Ruby | employees_853.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :tickets, :is_active | NONE | true |
DIFF00000004469 | mentioned_in_comment | Python | customers_767.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE inventory;") | DROP_TABLE | false |
DIFF00000004470 | general_code_change | JavaScript | refunds_148.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 |
DIFF00000004471 | general_code_change | Python | products_910.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004472 | mentioned_in_comment | Python | inventory_639.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events RENAME COLUMN email TO user_role; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004473 | general_code_change | Java | tickets_835.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000004474 | obfuscated_destructive | SQL | tickets_978.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
products; | TRUNCATE | true |
DIFF00000004475 | raw_sql_destructive | SQL | tickets_69.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00000004476 | general_code_change | JavaScript | shipments_692.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 |
DIFF00000004477 | orm_schema_change | JavaScript | reviews_982.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'description') | NONE | true |
DIFF00000004478 | mentioned_in_comment | Python | inventory_149.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM transactions; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000004479 | mentioned_in_comment | Python | payments_272.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE accounts RENAME COLUMN email TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004480 | general_code_change | Go | reviews_355.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000004481 | obfuscated_destructive | SQL | refunds_190.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from invoices; | DELETE_UNQUALIFIED | true |
DIFF00000004482 | raw_sql_destructive | SQL | sessions_190.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | true |
DIFF00000004483 | test_suite_cleanup | SQL | mysql-test/suite/shipments_570.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00000004484 | raw_sql_safe | SQL | employees_260.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE address = 'active'; | NONE | false |
DIFF00000004485 | general_code_change | JavaScript | employees_880.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000004486 | general_code_change | Python | employees_498.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000004487 | mentioned_in_comment | Python | tickets_520.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE invoices RENAME COLUMN balance TO contact_email; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004488 | orm_schema_change | TypeScript | users_552.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Products { // removed field: metadata } | NONE | true |
DIFF00000004489 | obfuscated_destructive | SQL | payments_258.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from employees; | DELETE_UNQUALIFIED | true |
DIFF00000004490 | orm_schema_change | Python | reviews_651.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='employees', name='description') | NONE | true |
DIFF00000004491 | raw_sql_destructive | SQL | shipments_266.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000004492 | raw_sql_safe | SQL | comments_462.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO customers (phone, is_active) VALUES (%s, %s); | NONE | false |
DIFF00000004493 | test_suite_cleanup | SQL | spec/orders_246.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | false |
DIFF00000004494 | mentioned_in_comment | Python | notifications_391.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE tickets; -- now deprecated""" | DROP_TABLE | false |
DIFF00000004495 | raw_sql_safe | SQL | products_992.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE balance = 'active'; | NONE | false |
DIFF00000004496 | mentioned_in_comment | Python | shipments_745.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory RENAME COLUMN amount TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000004497 | obfuscated_destructive | SQL | orders_117.sql | schema cleanup | @@ -1,3 +1,3 @@
+UpDATE seSSiOns sET sCoRE = ConcAt(SCORe, NamE); | UPDATE_CONCAT | true |
DIFF00000004498 | raw_sql_safe | SQL | sessions_676.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET phone = %s WHERE description = %s; | NONE | false |
DIFF00000004499 | raw_sql_destructive | SQL | products_476.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.