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 |
|---|---|---|---|---|---|---|---|
DIFF00000003300 | orm_schema_change | JavaScript | reviews_648.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('customers', table => table.dropColumn('balance')) | NONE | true |
DIFF00000003301 | raw_sql_destructive | SQL | tickets_196.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET created_at = CONCAT(created_at, email); | UPDATE_CONCAT | true |
DIFF00000003302 | raw_sql_destructive | SQL | tickets_862.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00000003303 | raw_sql_safe | SQL | inventory_641.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (user_id, description) VALUES (%s, %s); | NONE | false |
DIFF00000003304 | raw_sql_destructive | SQL | reviews_480.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00000003305 | orm_schema_change | Python | events_567.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='address') | NONE | true |
DIFF00000003306 | general_code_change | TypeScript | events_349.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 |
DIFF00000003307 | mentioned_in_comment | Python | products_107.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE comments RENAME COLUMN price TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000003308 | raw_sql_destructive | SQL | tickets_740.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN description; | DROP_COLUMN | true |
DIFF00000003309 | test_suite_cleanup | SQL | mysql-test/suite/inventory_825.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | false |
DIFF00000003310 | raw_sql_destructive | SQL | products_362.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN user_id TO state; | ALTER_RENAME | true |
DIFF00000003311 | general_code_change | JavaScript | subscriptions_487.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003312 | obfuscated_destructive | SQL | employees_856.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRuNcAtE tABle USErS; | TRUNCATE | true |
DIFF00000003313 | mentioned_in_comment | Python | tickets_51.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE accounts RENAME COLUMN price TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000003314 | raw_sql_destructive | SQL | inventory_480.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00000003315 | test_suite_cleanup | SQL | tests/refunds_576.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | false |
DIFF00000003316 | raw_sql_destructive | SQL | reviews_222.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00000003317 | obfuscated_destructive | SQL | logs_756.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000003318 | test_suite_cleanup | SQL | test/employees_190.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE orders SET phone = CONCAT(phone, balance); | UPDATE_CONCAT | false |
DIFF00000003319 | general_code_change | Python | shipments_362.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003320 | general_code_change | JavaScript | inventory_518.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 |
DIFF00000003321 | raw_sql_destructive | SQL | events_730.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM refunds; | DELETE_UNQUALIFIED | true |
DIFF00000003322 | raw_sql_safe | SQL | transactions_294.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_created_at ON users (address); | NONE | false |
DIFF00000003323 | orm_schema_change | JavaScript | inventory_165.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'balance') | NONE | true |
DIFF00000003324 | test_suite_cleanup | SQL | tests/notifications_986.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET balance = CONCAT(balance, balance); | UPDATE_CONCAT | false |
DIFF00000003325 | raw_sql_destructive | SQL | inventory_728.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN status TO state; | ALTER_RENAME | true |
DIFF00000003326 | raw_sql_safe | SQL | refunds_192.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE order_id = 'active'; | NONE | false |
DIFF00000003327 | general_code_change | Ruby | refunds_893.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003328 | raw_sql_safe | SQL | orders_738.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE payments SET created_at = %s WHERE role = %s; | NONE | false |
DIFF00000003329 | general_code_change | Python | logs_349.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003330 | orm_schema_change | Ruby | sessions_260.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :role | NONE | true |
DIFF00000003331 | general_code_change | JavaScript | logs_584.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 |
DIFF00000003332 | raw_sql_destructive | SQL | notifications_30.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000003333 | mentioned_in_comment | Python | shipments_611.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE payments DROP COLUMN balance;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000003334 | raw_sql_destructive | SQL | transactions_207.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000003335 | general_code_change | JavaScript | orders_174.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 |
DIFF00000003336 | mentioned_in_comment | Python | shipments_789.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE tickets; -- now deprecated""" | DROP_TABLE | false |
DIFF00000003337 | raw_sql_destructive | SQL | events_724.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE events DROP COLUMN phone; | DROP_COLUMN | true |
DIFF00000003338 | obfuscated_destructive | SQL | payments_466.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table orders; | TRUNCATE | true |
DIFF00000003339 | raw_sql_safe | SQL | sessions_542.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE products SET email = %s WHERE phone = %s; | NONE | false |
DIFF00000003340 | general_code_change | Java | comments_882.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003341 | test_suite_cleanup | SQL | mysql-test/suite/logs_93.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET category = CONCAT(category, order_id); | UPDATE_CONCAT | false |
DIFF00000003342 | raw_sql_safe | SQL | reviews_85.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (is_active, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000003343 | orm_schema_change | JavaScript | shipments_445.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('subscriptions', 'price') | NONE | true |
DIFF00000003344 | general_code_change | Java | logs_175.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003345 | raw_sql_safe | SQL | customers_230.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM customers WHERE priority = 'active'; | NONE | false |
DIFF00000003346 | obfuscated_destructive | SQL | employees_577.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table accounts rename column address to contact_email; | ALTER_RENAME | true |
DIFF00000003347 | orm_schema_change | TypeScript | inventory_240.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: is_active } | NONE | true |
DIFF00000003348 | orm_schema_change | JavaScript | users_296.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'price') | NONE | true |
DIFF00000003349 | orm_schema_change | Ruby | events_367.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :invoices, :created_at | NONE | true |
DIFF00000003350 | raw_sql_destructive | SQL | transactions_193.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000003351 | mentioned_in_comment | Python | users_351.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE accounts;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000003352 | general_code_change | Python | comments_31.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003353 | raw_sql_safe | SQL | subscriptions_560.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET quantity = %s WHERE created_at = %s; | NONE | false |
DIFF00000003354 | mentioned_in_comment | Python | customers_752.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM products;") | DELETE_UNQUALIFIED | false |
DIFF00000003355 | general_code_change | Java | tickets_885.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003356 | general_code_change | Go | notifications_170.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003357 | mentioned_in_comment | Python | users_292.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE payments DROP COLUMN category;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000003358 | mentioned_in_comment | Python | shipments_273.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE users; -- now deprecated""" | DROP_TABLE | false |
DIFF00000003359 | raw_sql_safe | SQL | invoices_729.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (score, status) VALUES (%s, %s); | NONE | false |
DIFF00000003360 | general_code_change | Ruby | transactions_396.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003361 | general_code_change | Python | users_924.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003362 | mentioned_in_comment | Python | refunds_811.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE invoices; -- now deprecated""" | TRUNCATE | false |
DIFF00000003363 | general_code_change | JavaScript | transactions_894.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 |
DIFF00000003364 | obfuscated_destructive | SQL | tickets_556.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
accounts; | DELETE_UNQUALIFIED | true |
DIFF00000003365 | general_code_change | Go | events_69.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003366 | orm_schema_change | TypeScript | products_77.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: phone } | NONE | true |
DIFF00000003367 | general_code_change | Go | orders_365.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003368 | obfuscated_destructive | SQL | products_699.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00000003369 | general_code_change | Java | logs_880.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003370 | raw_sql_destructive | SQL | events_651.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000003371 | raw_sql_safe | SQL | inventory_586.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000003372 | raw_sql_destructive | SQL | notifications_233.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00000003373 | general_code_change | Ruby | refunds_399.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003374 | obfuscated_destructive | SQL | sessions_866.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLtEr tAbLE REFunDS droP ColUmN CATeGoRY; | DROP_COLUMN | true |
DIFF00000003375 | general_code_change | JavaScript | shipments_431.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003376 | mentioned_in_comment | Python | shipments_15.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE inventory RENAME COLUMN is_active TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000003377 | raw_sql_destructive | SQL | reviews_648.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000003378 | raw_sql_destructive | SQL | accounts_617.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET quantity = CONCAT(quantity, priority); | UPDATE_CONCAT | true |
DIFF00000003379 | raw_sql_destructive | SQL | customers_605.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE customers DROP COLUMN user_id; | DROP_COLUMN | true |
DIFF00000003380 | raw_sql_safe | SQL | refunds_843.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (category, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000003381 | test_suite_cleanup | SQL | mysql-test/suite/payments_845.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN name TO state; | ALTER_RENAME | false |
DIFF00000003382 | orm_schema_change | JavaScript | employees_430.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('created_at')) | NONE | true |
DIFF00000003383 | raw_sql_safe | SQL | comments_104.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET priority = %s WHERE price = %s; | NONE | false |
DIFF00000003384 | test_suite_cleanup | SQL | tests/customers_714.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE payments DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00000003385 | raw_sql_destructive | SQL | payments_926.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM users; | DELETE_UNQUALIFIED | true |
DIFF00000003386 | raw_sql_destructive | SQL | shipments_834.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE reviews SET amount = CONCAT(amount, updated_at); | UPDATE_CONCAT | true |
DIFF00000003387 | general_code_change | JavaScript | events_452.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003388 | test_suite_cleanup | SQL | spec/customers_415.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN role TO user_role; | ALTER_RENAME | false |
DIFF00000003389 | mentioned_in_comment | Python | products_554.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE transactions DROP COLUMN balance;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000003390 | raw_sql_destructive | SQL | users_574.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | true |
DIFF00000003391 | mentioned_in_comment | Python | transactions_863.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE logs DROP COLUMN name;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000003392 | general_code_change | Ruby | invoices_391.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003393 | obfuscated_destructive | SQL | sessions_812.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | true |
DIFF00000003394 | test_suite_cleanup | SQL | test/transactions_694.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE inventory RENAME COLUMN role TO user_role; | ALTER_RENAME | false |
DIFF00000003395 | orm_schema_change | JavaScript | products_53.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('products', table => table.dropColumn('score')) | NONE | true |
DIFF00000003396 | raw_sql_safe | SQL | tickets_934.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM payments WHERE address = 'active'; | NONE | false |
DIFF00000003397 | obfuscated_destructive | SQL | payments_210.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE shipments SET order_id = CONCAT(order_id, score); | UPDATE_CONCAT | true |
DIFF00000003398 | mentioned_in_comment | Python | accounts_403.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE orders SET balance = CONCAT(balance, order_id); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000003399 | general_code_change | Python | sessions_163.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.