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 |
|---|---|---|---|---|---|---|---|
DIFF00000009600 | orm_schema_change | JavaScript | orders_46.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('phone')) | NONE | true |
DIFF00000009601 | orm_schema_change | Python | products_438.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='status') | NONE | true |
DIFF00000009602 | obfuscated_destructive | SQL | tickets_473.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop TaBlE ProDUCTS; | DROP_TABLE | true |
DIFF00000009603 | mentioned_in_comment | Python | sessions_996.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE sessions SET created_at = CONCAT(created_at, amount); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000009604 | orm_schema_change | Ruby | shipments_138.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :payments, :quantity | NONE | true |
DIFF00000009605 | orm_schema_change | TypeScript | subscriptions_808.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: metadata } | NONE | true |
DIFF00000009606 | mentioned_in_comment | Python | refunds_973.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE payments RENAME COLUMN description TO contact_email;") | ALTER_RENAME | false |
DIFF00000009607 | general_code_change | Python | accounts_906.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009608 | orm_schema_change | Ruby | subscriptions_385.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :address | NONE | true |
DIFF00000009609 | orm_schema_change | Python | transactions_939.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='tickets', name='amount') | NONE | true |
DIFF00000009610 | general_code_change | Python | logs_447.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009611 | general_code_change | Python | inventory_77.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009612 | raw_sql_safe | SQL | accounts_608.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET order_id = %s WHERE quantity = %s; | NONE | false |
DIFF00000009613 | general_code_change | TypeScript | users_227.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 |
DIFF00000009614 | orm_schema_change | JavaScript | invoices_52.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000009615 | general_code_change | Python | invoices_968.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009616 | test_suite_cleanup | SQL | spec/shipments_528.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE payments; | DROP_TABLE | false |
DIFF00000009617 | obfuscated_destructive | SQL | payments_231.sql | schema cleanup | @@ -1,3 +1,3 @@
+truNCaTE TABle RevIEWS; | TRUNCATE | true |
DIFF00000009618 | orm_schema_change | Ruby | invoices_640.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :amount | NONE | true |
DIFF00000009619 | orm_schema_change | JavaScript | sessions_658.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('transactions', 'role') | NONE | true |
DIFF00000009620 | test_suite_cleanup | SQL | test/customers_980.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN metadata; | DROP_COLUMN | false |
DIFF00000009621 | raw_sql_destructive | SQL | employees_245.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN updated_at; | DROP_COLUMN | true |
DIFF00000009622 | obfuscated_destructive | SQL | transactions_528.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00000009623 | orm_schema_change | Ruby | notifications_196.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :address | NONE | true |
DIFF00000009624 | test_suite_cleanup | SQL | test/inventory_553.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | false |
DIFF00000009625 | test_suite_cleanup | SQL | mysql-test/suite/shipments_904.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE invoices SET score = CONCAT(score, address); | UPDATE_CONCAT | false |
DIFF00000009626 | mentioned_in_comment | Python | reviews_948.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE notifications DROP COLUMN role;") | DROP_COLUMN | false |
DIFF00000009627 | raw_sql_safe | SQL | products_627.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (status, quantity) VALUES (%s, %s); | NONE | false |
DIFF00000009628 | orm_schema_change | JavaScript | products_583.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000009629 | raw_sql_destructive | SQL | subscriptions_524.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN order_id TO user_role; | ALTER_RENAME | true |
DIFF00000009630 | orm_schema_change | JavaScript | subscriptions_139.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('balance')) | NONE | true |
DIFF00000009631 | raw_sql_destructive | SQL | refunds_834.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000009632 | test_suite_cleanup | SQL | tests/products_627.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | false |
DIFF00000009633 | mentioned_in_comment | Python | products_165.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE transactions;") | DROP_TABLE | false |
DIFF00000009634 | general_code_change | JavaScript | products_602.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 |
DIFF00000009635 | orm_schema_change | JavaScript | products_997.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'balance') | NONE | true |
DIFF00000009636 | mentioned_in_comment | Python | subscriptions_534.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE sessions;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000009637 | obfuscated_destructive | SQL | logs_827.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
events; | DELETE_UNQUALIFIED | true |
DIFF00000009638 | orm_schema_change | TypeScript | notifications_918.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Logs { // removed field: metadata } | NONE | true |
DIFF00000009639 | obfuscated_destructive | SQL | shipments_404.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
employees; | DELETE_UNQUALIFIED | true |
DIFF00000009640 | obfuscated_destructive | SQL | users_667.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE customers SET updated_at = CONCAT(updated_at, is_active); | UPDATE_CONCAT | true |
DIFF00000009641 | general_code_change | Python | customers_176.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009642 | raw_sql_destructive | SQL | shipments_963.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000009643 | raw_sql_safe | SQL | employees_332.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (phone, category) VALUES (%s, %s); | NONE | false |
DIFF00000009644 | general_code_change | Java | sessions_428.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009645 | obfuscated_destructive | SQL | employees_869.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table events drop column created_at; | DROP_COLUMN | true |
DIFF00000009646 | general_code_change | JavaScript | tickets_436.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 |
DIFF00000009647 | orm_schema_change | TypeScript | notifications_576.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: score } | NONE | true |
DIFF00000009648 | raw_sql_safe | SQL | employees_86.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_metadata ON comments (created_at); | NONE | false |
DIFF00000009649 | general_code_change | JavaScript | comments_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 |
DIFF00000009650 | raw_sql_safe | SQL | events_464.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000009651 | test_suite_cleanup | SQL | mysql-test/suite/users_171.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00000009652 | general_code_change | TypeScript | products_67.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 |
DIFF00000009653 | obfuscated_destructive | SQL | products_692.sql | schema cleanup | @@ -1,3 +1,3 @@
+DeLetE from ORdeRS; | DELETE_UNQUALIFIED | true |
DIFF00000009654 | mentioned_in_comment | Python | shipments_316.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE tickets DROP COLUMN score;") | DROP_COLUMN | false |
DIFF00000009655 | raw_sql_safe | SQL | payments_473.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (created_at, metadata) VALUES (%s, %s); | NONE | false |
DIFF00000009656 | general_code_change | Python | orders_69.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009657 | general_code_change | Python | refunds_911.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009658 | raw_sql_destructive | SQL | shipments_78.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN email TO amount_cents; | ALTER_RENAME | true |
DIFF00000009659 | mentioned_in_comment | Python | notifications_57.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE employees SET is_active = CONCAT(is_active, phone);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000009660 | orm_schema_change | JavaScript | employees_229.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'created_at') | NONE | true |
DIFF00000009661 | obfuscated_destructive | SQL | refunds_3.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
tickets
SET
score
=
CONCAT(score,
price); | UPDATE_CONCAT | true |
DIFF00000009662 | raw_sql_destructive | SQL | invoices_382.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN balance TO amount_cents; | ALTER_RENAME | true |
DIFF00000009663 | mentioned_in_comment | Python | invoices_982.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE accounts RENAME COLUMN is_active TO state;") | ALTER_RENAME | false |
DIFF00000009664 | mentioned_in_comment | Python | notifications_758.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE payments;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000009665 | general_code_change | Python | employees_172.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000009666 | general_code_change | Ruby | reviews_417.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000009667 | raw_sql_destructive | SQL | employees_801.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN address; | DROP_COLUMN | true |
DIFF00000009668 | raw_sql_safe | SQL | subscriptions_472.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000009669 | raw_sql_safe | SQL | refunds_139.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE priority = 'active'; | NONE | false |
DIFF00000009670 | obfuscated_destructive | SQL | reviews_527.sql | schema cleanup | @@ -1,3 +1,3 @@
+UpDaTe TRAnSactIoNs Set bAlaNcE = CoNCat(bALance, NaMe); | UPDATE_CONCAT | true |
DIFF00000009671 | obfuscated_destructive | SQL | orders_902.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE customers SET category = CONCAT(category, name); | UPDATE_CONCAT | true |
DIFF00000009672 | raw_sql_destructive | SQL | logs_929.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00000009673 | general_code_change | TypeScript | shipments_15.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 |
DIFF00000009674 | orm_schema_change | TypeScript | transactions_485.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Transactions { // removed field: price } | NONE | true |
DIFF00000009675 | test_suite_cleanup | SQL | mysql-test/suite/shipments_779.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE reviews RENAME COLUMN order_id TO user_role; | ALTER_RENAME | false |
DIFF00000009676 | orm_schema_change | JavaScript | shipments_823.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('is_active')) | NONE | true |
DIFF00000009677 | raw_sql_safe | SQL | customers_698.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (metadata, price) VALUES (%s, %s); | NONE | false |
DIFF00000009678 | orm_schema_change | JavaScript | reviews_528.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000009679 | orm_schema_change | Ruby | reviews_759.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :order_id | NONE | true |
DIFF00000009680 | orm_schema_change | JavaScript | reviews_309.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('email')) | NONE | true |
DIFF00000009681 | raw_sql_safe | SQL | accounts_951.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM inventory WHERE is_active = 'active'; | NONE | false |
DIFF00000009682 | raw_sql_safe | SQL | inventory_975.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE balance = 'active'; | NONE | false |
DIFF00000009683 | general_code_change | Python | orders_65.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000009684 | general_code_change | TypeScript | invoices_125.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 |
DIFF00000009685 | raw_sql_destructive | SQL | sessions_81.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | true |
DIFF00000009686 | orm_schema_change | Ruby | refunds_294.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :inventory, :score | NONE | true |
DIFF00000009687 | raw_sql_destructive | SQL | sessions_957.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN name TO state; | ALTER_RENAME | true |
DIFF00000009688 | orm_schema_change | JavaScript | inventory_428.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'role') | NONE | true |
DIFF00000009689 | general_code_change | JavaScript | invoices_923.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 |
DIFF00000009690 | test_suite_cleanup | SQL | mysql-test/suite/comments_34.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE tickets RENAME COLUMN order_id TO full_name; | ALTER_RENAME | false |
DIFF00000009691 | general_code_change | Java | subscriptions_5.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000009692 | raw_sql_safe | SQL | events_518.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM logs WHERE description = 'active'; | NONE | false |
DIFF00000009693 | mentioned_in_comment | Python | logs_795.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE payments RENAME COLUMN updated_at TO user_role;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000009694 | mentioned_in_comment | Python | comments_976.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE tickets;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000009695 | raw_sql_safe | SQL | refunds_130.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (role, amount) VALUES (%s, %s); | NONE | false |
DIFF00000009696 | mentioned_in_comment | Python | products_891.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE events;") | DROP_TABLE | false |
DIFF00000009697 | obfuscated_destructive | SQL | reviews_389.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table orders rename column order_id to user_role; | ALTER_RENAME | true |
DIFF00000009698 | raw_sql_destructive | SQL | tickets_52.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00000009699 | raw_sql_destructive | SQL | comments_876.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN description TO user_role; | ALTER_RENAME | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.