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 |
|---|---|---|---|---|---|---|---|
DIFF00000001700 | raw_sql_destructive | SQL | invoices_779.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN category; | DROP_COLUMN | true |
DIFF00000001701 | orm_schema_change | Ruby | orders_630.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :status | NONE | true |
DIFF00000001702 | obfuscated_destructive | SQL | employees_419.sql | schema cleanup | @@ -1,3 +1,3 @@
+UpdAte EVEnts SEt aDdRESs = ConCAt(adDreSS, UseR_ID); | UPDATE_CONCAT | true |
DIFF00000001703 | raw_sql_safe | SQL | users_872.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000001704 | general_code_change | Java | logs_992.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001705 | test_suite_cleanup | SQL | spec/payments_801.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE sessions RENAME COLUMN score TO user_role; | ALTER_RENAME | false |
DIFF00000001706 | orm_schema_change | Python | invoices_750.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='refunds', name='description') | NONE | true |
DIFF00000001707 | mentioned_in_comment | Python | refunds_153.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM employees; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001708 | obfuscated_destructive | SQL | transactions_587.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN score; | DROP_COLUMN | true |
DIFF00000001709 | obfuscated_destructive | SQL | notifications_538.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table subscriptions; | DROP_TABLE | true |
DIFF00000001710 | raw_sql_destructive | SQL | inventory_736.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00000001711 | mentioned_in_comment | Python | logs_657.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM customers; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001712 | raw_sql_safe | SQL | products_906.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE accounts SET price = %s WHERE phone = %s; | NONE | false |
DIFF00000001713 | test_suite_cleanup | SQL | spec/sessions_28.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET balance = CONCAT(balance, user_id); | UPDATE_CONCAT | false |
DIFF00000001714 | raw_sql_destructive | SQL | users_401.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000001715 | mentioned_in_comment | Python | customers_614.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE sessions DROP COLUMN is_active; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000001716 | raw_sql_safe | SQL | orders_30.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (is_active, role) VALUES (%s, %s); | NONE | false |
DIFF00000001717 | mentioned_in_comment | Python | invoices_638.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN updated_at TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000001718 | general_code_change | Python | reviews_185.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001719 | mentioned_in_comment | Python | subscriptions_394.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE products RENAME COLUMN user_id TO state; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000001720 | obfuscated_destructive | SQL | comments_40.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
events; | TRUNCATE | true |
DIFF00000001721 | obfuscated_destructive | SQL | inventory_22.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPdATE ORDers SeT PhonE = ConCAt(PHonE, PHONE); | UPDATE_CONCAT | true |
DIFF00000001722 | general_code_change | Java | refunds_740.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001723 | raw_sql_safe | SQL | invoices_652.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_user_id ON tickets (quantity); | NONE | false |
DIFF00000001724 | orm_schema_change | JavaScript | events_121.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('priority')) | NONE | true |
DIFF00000001725 | test_suite_cleanup | SQL | mysql-test/suite/comments_904.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET updated_at = CONCAT(updated_at, price); | UPDATE_CONCAT | false |
DIFF00000001726 | orm_schema_change | JavaScript | customers_102.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('name')) | NONE | true |
DIFF00000001727 | orm_schema_change | JavaScript | transactions_424.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('price')) | NONE | true |
DIFF00000001728 | general_code_change | Ruby | shipments_905.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001729 | raw_sql_safe | SQL | events_56.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET created_at = %s WHERE phone = %s; | NONE | false |
DIFF00000001730 | test_suite_cleanup | SQL | tests/payments_205.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE customers SET metadata = CONCAT(metadata, description); | UPDATE_CONCAT | false |
DIFF00000001731 | general_code_change | JavaScript | payments_328.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 |
DIFF00000001732 | mentioned_in_comment | Python | subscriptions_530.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE invoices;") | DROP_TABLE | false |
DIFF00000001733 | raw_sql_destructive | SQL | inventory_496.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00000001734 | test_suite_cleanup | SQL | test/notifications_541.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00000001735 | raw_sql_destructive | SQL | employees_178.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000001736 | mentioned_in_comment | Python | reviews_658.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE inventory;") | DROP_TABLE | false |
DIFF00000001737 | orm_schema_change | JavaScript | orders_980.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('reviews', table => table.dropColumn('phone')) | NONE | true |
DIFF00000001738 | mentioned_in_comment | Python | tickets_549.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE reviews SET name = CONCAT(name, status);") | UPDATE_CONCAT | false |
DIFF00000001739 | general_code_change | Python | users_81.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001740 | general_code_change | Ruby | refunds_562.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001741 | general_code_change | JavaScript | inventory_776.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001742 | mentioned_in_comment | Python | employees_626.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: UPDATE events SET quantity = CONCAT(quantity, category);") | UPDATE_CONCAT | false |
DIFF00000001743 | test_suite_cleanup | SQL | mysql-test/suite/logs_128.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE transactions SET is_active = CONCAT(is_active, email); | UPDATE_CONCAT | false |
DIFF00000001744 | general_code_change | Python | users_181.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001745 | orm_schema_change | TypeScript | tickets_676.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: balance } | NONE | true |
DIFF00000001746 | general_code_change | TypeScript | inventory_969.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 |
DIFF00000001747 | raw_sql_safe | SQL | customers_46.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE orders SET updated_at = %s WHERE status = %s; | NONE | false |
DIFF00000001748 | mentioned_in_comment | Python | inventory_795.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE refunds;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000001749 | mentioned_in_comment | Python | notifications_374.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE employees SET status = CONCAT(status, updated_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000001750 | general_code_change | JavaScript | shipments_837.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001751 | obfuscated_destructive | SQL | users_766.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
products
DROP
COLUMN
order_id; | DROP_COLUMN | true |
DIFF00000001752 | general_code_change | Ruby | tickets_705.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001753 | raw_sql_destructive | SQL | shipments_956.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | true |
DIFF00000001754 | test_suite_cleanup | SQL | spec/refunds_648.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00000001755 | test_suite_cleanup | SQL | mysql-test/suite/invoices_497.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | false |
DIFF00000001756 | orm_schema_change | Ruby | logs_851.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :users, :category | NONE | true |
DIFF00000001757 | general_code_change | Python | employees_346.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001758 | general_code_change | Python | customers_331.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001759 | orm_schema_change | JavaScript | reviews_234.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'phone') | NONE | true |
DIFF00000001760 | raw_sql_safe | SQL | events_18.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_subscriptions_created_at ON subscriptions (is_active); | NONE | false |
DIFF00000001761 | general_code_change | JavaScript | tickets_576.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 |
DIFF00000001762 | raw_sql_destructive | SQL | inventory_309.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | true |
DIFF00000001763 | orm_schema_change | TypeScript | comments_966.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Tickets { // removed field: order_id } | NONE | true |
DIFF00000001764 | raw_sql_safe | SQL | employees_406.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO reviews (description, address) VALUES (%s, %s); | NONE | false |
DIFF00000001765 | raw_sql_destructive | SQL | reviews_574.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE refunds RENAME COLUMN email TO contact_email; | ALTER_RENAME | true |
DIFF00000001766 | raw_sql_destructive | SQL | employees_618.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN address TO full_name; | ALTER_RENAME | true |
DIFF00000001767 | obfuscated_destructive | SQL | logs_813.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE TABLE payments; | TRUNCATE | true |
DIFF00000001768 | general_code_change | Python | subscriptions_683.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001769 | raw_sql_safe | SQL | payments_840.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_users_metadata ON users (user_id); | NONE | false |
DIFF00000001770 | obfuscated_destructive | SQL | logs_589.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
notifications; | TRUNCATE | true |
DIFF00000001771 | orm_schema_change | JavaScript | refunds_408.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'quantity') | NONE | true |
DIFF00000001772 | general_code_change | Python | refunds_684.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001773 | raw_sql_destructive | SQL | reviews_409.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN score TO state; | ALTER_RENAME | true |
DIFF00000001774 | orm_schema_change | Python | payments_579.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='users', name='name') | NONE | true |
DIFF00000001775 | obfuscated_destructive | SQL | products_720.sql | schema cleanup | @@ -1,3 +1,3 @@
+update tickets set description = concat(description, description); | UPDATE_CONCAT | true |
DIFF00000001776 | test_suite_cleanup | SQL | mysql-test/suite/orders_74.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN phone; | DROP_COLUMN | false |
DIFF00000001777 | mentioned_in_comment | Python | employees_473.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE notifications; -- now deprecated""" | TRUNCATE | false |
DIFF00000001778 | mentioned_in_comment | Python | logs_994.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE shipments;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00000001779 | raw_sql_destructive | SQL | shipments_450.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE subscriptions; | DROP_TABLE | true |
DIFF00000001780 | raw_sql_safe | SQL | customers_902.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_products_status ON products (updated_at); | NONE | false |
DIFF00000001781 | raw_sql_safe | SQL | payments_200.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO events (description, balance) VALUES (%s, %s); | NONE | false |
DIFF00000001782 | orm_schema_change | JavaScript | inventory_838.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'phone') | NONE | true |
DIFF00000001783 | general_code_change | JavaScript | products_906.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001784 | general_code_change | JavaScript | events_414.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 |
DIFF00000001785 | raw_sql_safe | SQL | comments_144.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET category = %s WHERE is_active = %s; | NONE | false |
DIFF00000001786 | test_suite_cleanup | SQL | spec/events_299.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN created_at; | DROP_COLUMN | false |
DIFF00000001787 | obfuscated_destructive | SQL | payments_169.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE accounts RENAME COLUMN priority TO state; | ALTER_RENAME | true |
DIFF00000001788 | general_code_change | Ruby | employees_177.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001789 | raw_sql_safe | SQL | orders_581.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO subscriptions (quantity, user_id) VALUES (%s, %s); | NONE | false |
DIFF00000001790 | mentioned_in_comment | Python | orders_928.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE inventory SET balance = CONCAT(balance, quantity);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000001791 | obfuscated_destructive | SQL | sessions_685.sql | schema cleanup | @@ -1,3 +1,3 @@
+AlteR tABLe CoMMENTS dROp COLuMN pRIce; | DROP_COLUMN | true |
DIFF00000001792 | test_suite_cleanup | SQL | tests/inventory_29.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN priority TO amount_cents; | ALTER_RENAME | false |
DIFF00000001793 | obfuscated_destructive | SQL | customers_635.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE users RENAME COLUMN role TO full_name; | ALTER_RENAME | true |
DIFF00000001794 | general_code_change | Python | payments_912.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001795 | general_code_change | Python | shipments_237.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001796 | general_code_change | Java | refunds_398.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001797 | general_code_change | TypeScript | products_491.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 |
DIFF00000001798 | obfuscated_destructive | SQL | transactions_268.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | true |
DIFF00000001799 | raw_sql_safe | SQL | shipments_19.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO shipments (price, balance) 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.