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 |
|---|---|---|---|---|---|---|---|
DIFF00099994700 | raw_sql_destructive | SQL | users_265.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET description = CONCAT(description, price); | UPDATE_CONCAT | true |
DIFF00099994701 | mentioned_in_comment | Python | logs_113.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM notifications; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099994702 | mentioned_in_comment | Python | payments_164.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM events; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099994703 | mentioned_in_comment | Python | refunds_156.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE employees DROP COLUMN updated_at;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00099994704 | obfuscated_destructive | SQL | notifications_322.sql | schema cleanup | @@ -1,3 +1,3 @@
+AltEr tABLE EveNts dRoP COLuMN Price; | DROP_COLUMN | true |
DIFF00099994705 | orm_schema_change | JavaScript | comments_139.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'status') | NONE | true |
DIFF00099994706 | raw_sql_safe | SQL | employees_666.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (category, role) VALUES (%s, %s); | NONE | false |
DIFF00099994707 | orm_schema_change | Python | inventory_791.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='role') | NONE | true |
DIFF00099994708 | obfuscated_destructive | SQL | invoices_806.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table accounts; | TRUNCATE | true |
DIFF00099994709 | obfuscated_destructive | SQL | employees_172.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
inventory; | DROP_TABLE | true |
DIFF00099994710 | obfuscated_destructive | SQL | accounts_741.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
notifications
RENAME
COLUMN
role
TO
amount_cents; | ALTER_RENAME | true |
DIFF00099994711 | raw_sql_safe | SQL | payments_90.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO reviews (phone, role) VALUES (%s, %s); | NONE | false |
DIFF00099994712 | general_code_change | Java | invoices_245.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994713 | orm_schema_change | Python | logs_756.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='email') | NONE | true |
DIFF00099994714 | raw_sql_safe | SQL | inventory_450.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE balance = 'active'; | NONE | false |
DIFF00099994715 | test_suite_cleanup | SQL | test/reviews_39.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN description TO amount_cents; | ALTER_RENAME | false |
DIFF00099994716 | mentioned_in_comment | Python | sessions_126.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE notifications SET created_at = CONCAT(created_at, address);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099994717 | raw_sql_safe | SQL | inventory_7.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00099994718 | general_code_change | JavaScript | sessions_136.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 |
DIFF00099994719 | general_code_change | JavaScript | products_507.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994720 | obfuscated_destructive | SQL | customers_750.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00099994721 | general_code_change | JavaScript | comments_824.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 |
DIFF00099994722 | mentioned_in_comment | Python | transactions_958.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE logs;") | DROP_TABLE | false |
DIFF00099994723 | mentioned_in_comment | Python | logs_850.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE sessions DROP COLUMN phone;") | DROP_COLUMN | false |
DIFF00099994724 | raw_sql_safe | SQL | products_776.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET status = %s WHERE address = %s; | NONE | false |
DIFF00099994725 | orm_schema_change | JavaScript | shipments_400.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('subscriptions', table => table.dropColumn('score')) | NONE | true |
DIFF00099994726 | raw_sql_destructive | SQL | logs_310.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00099994727 | raw_sql_destructive | SQL | shipments_234.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00099994728 | raw_sql_destructive | SQL | inventory_486.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM transactions; | DELETE_UNQUALIFIED | true |
DIFF00099994729 | raw_sql_safe | SQL | notifications_866.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM tickets WHERE priority = 'active'; | NONE | false |
DIFF00099994730 | test_suite_cleanup | SQL | mysql-test/suite/accounts_157.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN phone TO state; | ALTER_RENAME | false |
DIFF00099994731 | test_suite_cleanup | SQL | mysql-test/suite/refunds_444.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN description; | DROP_COLUMN | false |
DIFF00099994732 | raw_sql_safe | SQL | products_736.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE shipments SET metadata = %s WHERE score = %s; | NONE | false |
DIFF00099994733 | orm_schema_change | TypeScript | refunds_839.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Comments { // removed field: quantity } | NONE | true |
DIFF00099994734 | test_suite_cleanup | SQL | mysql-test/suite/notifications_161.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN quantity TO user_role; | ALTER_RENAME | false |
DIFF00099994735 | general_code_change | JavaScript | customers_862.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994736 | general_code_change | TypeScript | products_549.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 |
DIFF00099994737 | orm_schema_change | JavaScript | accounts_44.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('shipments', 'status') | NONE | true |
DIFF00099994738 | general_code_change | Python | notifications_48.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099994739 | mentioned_in_comment | Python | customers_841.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE subscriptions RENAME COLUMN role TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099994740 | obfuscated_destructive | SQL | customers_920.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
tickets; | DELETE_UNQUALIFIED | true |
DIFF00099994741 | raw_sql_safe | SQL | sessions_297.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099994742 | test_suite_cleanup | SQL | spec/inventory_759.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE refunds DROP COLUMN category; | DROP_COLUMN | false |
DIFF00099994743 | general_code_change | TypeScript | invoices_58.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 |
DIFF00099994744 | raw_sql_safe | SQL | sessions_45.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_sessions_priority ON sessions (status); | NONE | false |
DIFF00099994745 | raw_sql_safe | SQL | invoices_248.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM invoices WHERE order_id = 'active'; | NONE | false |
DIFF00099994746 | raw_sql_destructive | SQL | transactions_901.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE users SET balance = CONCAT(balance, description); | UPDATE_CONCAT | true |
DIFF00099994747 | general_code_change | JavaScript | transactions_634.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 |
DIFF00099994748 | obfuscated_destructive | SQL | notifications_216.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table accounts; | TRUNCATE | true |
DIFF00099994749 | general_code_change | Go | sessions_917.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994750 | raw_sql_destructive | SQL | invoices_979.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE logs SET metadata = CONCAT(metadata, created_at); | UPDATE_CONCAT | true |
DIFF00099994751 | orm_schema_change | JavaScript | orders_720.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('status')) | NONE | true |
DIFF00099994752 | raw_sql_safe | SQL | shipments_591.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00099994753 | raw_sql_destructive | SQL | transactions_448.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE customers SET description = CONCAT(description, updated_at); | UPDATE_CONCAT | true |
DIFF00099994754 | general_code_change | TypeScript | reviews_487.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 |
DIFF00099994755 | obfuscated_destructive | SQL | employees_184.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table payments; | TRUNCATE | true |
DIFF00099994756 | orm_schema_change | Python | payments_185.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='inventory', name='order_id') | NONE | true |
DIFF00099994757 | test_suite_cleanup | SQL | test/products_592.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | false |
DIFF00099994758 | test_suite_cleanup | SQL | tests/customers_748.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE sessions; | TRUNCATE | false |
DIFF00099994759 | general_code_change | Go | comments_310.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099994760 | orm_schema_change | Python | subscriptions_603.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='user_id') | NONE | true |
DIFF00099994761 | general_code_change | Java | tickets_245.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00099994762 | orm_schema_change | JavaScript | subscriptions_143.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'phone') | NONE | true |
DIFF00099994763 | orm_schema_change | JavaScript | employees_358.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('category')) | NONE | true |
DIFF00099994764 | orm_schema_change | JavaScript | logs_57.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'status') | NONE | true |
DIFF00099994765 | obfuscated_destructive | SQL | users_905.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
customers; | DROP_TABLE | true |
DIFF00099994766 | orm_schema_change | TypeScript | orders_981.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: status } | NONE | true |
DIFF00099994767 | general_code_change | JavaScript | events_511.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994768 | obfuscated_destructive | SQL | payments_595.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlTER tABlE REFuNDs drOP cOLumn RolE; | DROP_COLUMN | true |
DIFF00099994769 | test_suite_cleanup | SQL | spec/inventory_593.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | false |
DIFF00099994770 | raw_sql_safe | SQL | comments_987.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE accounts ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099994771 | test_suite_cleanup | SQL | test/accounts_64.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions DROP COLUMN quantity; | DROP_COLUMN | false |
DIFF00099994772 | raw_sql_safe | SQL | employees_716.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_reviews_phone ON reviews (order_id); | NONE | false |
DIFF00099994773 | raw_sql_safe | SQL | orders_539.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE updated_at = 'active'; | NONE | false |
DIFF00099994774 | raw_sql_safe | SQL | shipments_756.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_quantity ON transactions (status); | NONE | false |
DIFF00099994775 | raw_sql_destructive | SQL | customers_266.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN phone TO full_name; | ALTER_RENAME | true |
DIFF00099994776 | general_code_change | JavaScript | transactions_599.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099994777 | test_suite_cleanup | SQL | spec/users_945.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00099994778 | test_suite_cleanup | SQL | test/invoices_510.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE sessions SET quantity = CONCAT(quantity, priority); | UPDATE_CONCAT | false |
DIFF00099994779 | orm_schema_change | JavaScript | employees_78.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('invoices', 'address') | NONE | true |
DIFF00099994780 | obfuscated_destructive | SQL | employees_404.sql | schema cleanup | @@ -1,3 +1,3 @@
+update shipments set amount = concat(amount, updated_at); | UPDATE_CONCAT | true |
DIFF00099994781 | raw_sql_destructive | SQL | customers_682.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | true |
DIFF00099994782 | raw_sql_safe | SQL | reviews_893.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE category = 'active'; | NONE | false |
DIFF00099994783 | raw_sql_destructive | SQL | orders_567.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00099994784 | obfuscated_destructive | SQL | comments_195.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
comments; | TRUNCATE | true |
DIFF00099994785 | orm_schema_change | Ruby | transactions_820.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :quantity | NONE | true |
DIFF00099994786 | orm_schema_change | JavaScript | invoices_593.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'updated_at') | NONE | true |
DIFF00099994787 | orm_schema_change | TypeScript | notifications_470.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Sessions { // removed field: created_at } | NONE | true |
DIFF00099994788 | raw_sql_safe | SQL | inventory_179.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET quantity = %s WHERE updated_at = %s; | NONE | false |
DIFF00099994789 | raw_sql_destructive | SQL | products_255.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00099994790 | test_suite_cleanup | SQL | mysql-test/suite/employees_806.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN balance TO state; | ALTER_RENAME | false |
DIFF00099994791 | orm_schema_change | TypeScript | tickets_990.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: priority } | NONE | true |
DIFF00099994792 | raw_sql_destructive | SQL | refunds_608.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN is_active TO state; | ALTER_RENAME | true |
DIFF00099994793 | test_suite_cleanup | SQL | mysql-test/suite/refunds_280.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE shipments SET role = CONCAT(role, status); | UPDATE_CONCAT | false |
DIFF00099994794 | test_suite_cleanup | SQL | test/accounts_969.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE users DROP COLUMN status; | DROP_COLUMN | false |
DIFF00099994795 | raw_sql_destructive | SQL | employees_736.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00099994796 | orm_schema_change | Python | transactions_952.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='score') | NONE | true |
DIFF00099994797 | orm_schema_change | TypeScript | subscriptions_426.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: priority } | NONE | true |
DIFF00099994798 | raw_sql_destructive | SQL | inventory_125.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments RENAME COLUMN priority TO contact_email; | ALTER_RENAME | true |
DIFF00099994799 | general_code_change | Go | logs_526.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.