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 |
|---|---|---|---|---|---|---|---|
DIFF00000003200 | orm_schema_change | Ruby | payments_320.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :logs, :email | NONE | true |
DIFF00000003201 | raw_sql_destructive | SQL | logs_620.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN role; | DROP_COLUMN | true |
DIFF00000003202 | raw_sql_safe | SQL | shipments_313.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE price = 'active'; | NONE | false |
DIFF00000003203 | orm_schema_change | Python | users_86.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='user_id') | NONE | true |
DIFF00000003204 | test_suite_cleanup | SQL | test/comments_304.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN order_id; | DROP_COLUMN | false |
DIFF00000003205 | raw_sql_safe | SQL | sessions_406.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000003206 | raw_sql_safe | SQL | refunds_179.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (metadata, phone) VALUES (%s, %s); | NONE | false |
DIFF00000003207 | general_code_change | JavaScript | shipments_483.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003208 | orm_schema_change | JavaScript | logs_846.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('sessions', 'phone') | NONE | true |
DIFF00000003209 | raw_sql_destructive | SQL | orders_829.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE users SET name = CONCAT(name, is_active); | UPDATE_CONCAT | true |
DIFF00000003210 | orm_schema_change | JavaScript | subscriptions_848.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('notifications', 'is_active') | NONE | true |
DIFF00000003211 | mentioned_in_comment | Python | events_819.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE notifications DROP COLUMN name; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000003212 | general_code_change | Java | orders_229.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003213 | raw_sql_safe | SQL | notifications_651.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_description ON payments (email); | NONE | false |
DIFF00000003214 | raw_sql_safe | SQL | inventory_887.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM subscriptions WHERE role = 'active'; | NONE | false |
DIFF00000003215 | raw_sql_safe | SQL | users_605.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE refunds SET status = %s WHERE role = %s; | NONE | false |
DIFF00000003216 | raw_sql_destructive | SQL | comments_634.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE logs; | TRUNCATE | true |
DIFF00000003217 | test_suite_cleanup | SQL | spec/reviews_413.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | false |
DIFF00000003218 | raw_sql_destructive | SQL | refunds_303.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE reviews; | DROP_TABLE | true |
DIFF00000003219 | general_code_change | Ruby | events_562.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003220 | general_code_change | JavaScript | employees_777.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 |
DIFF00000003221 | test_suite_cleanup | SQL | test/logs_197.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00000003222 | raw_sql_destructive | SQL | payments_434.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees DROP COLUMN price; | DROP_COLUMN | true |
DIFF00000003223 | raw_sql_safe | SQL | reviews_116.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000003224 | raw_sql_destructive | SQL | reviews_389.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN status; | DROP_COLUMN | true |
DIFF00000003225 | raw_sql_safe | SQL | refunds_604.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE customers ADD COLUMN full_name VARCHAR(255); | NONE | false |
DIFF00000003226 | test_suite_cleanup | SQL | tests/customers_805.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | false |
DIFF00000003227 | general_code_change | Python | comments_177.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003228 | mentioned_in_comment | Python | logs_152.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE comments SET address = CONCAT(address, order_id); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000003229 | general_code_change | Ruby | employees_853.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000003230 | orm_schema_change | JavaScript | sessions_391.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('tickets', table => table.dropColumn('order_id')) | NONE | true |
DIFF00000003231 | test_suite_cleanup | SQL | mysql-test/suite/notifications_644.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN priority TO full_name; | ALTER_RENAME | false |
DIFF00000003232 | test_suite_cleanup | SQL | tests/comments_2.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE products RENAME COLUMN score TO user_role; | ALTER_RENAME | false |
DIFF00000003233 | orm_schema_change | TypeScript | refunds_152.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: amount } | NONE | true |
DIFF00000003234 | general_code_change | Python | refunds_659.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003235 | orm_schema_change | JavaScript | invoices_797.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'priority') | NONE | true |
DIFF00000003236 | obfuscated_destructive | SQL | events_319.sql | schema cleanup | @@ -1,3 +1,3 @@
+update events set balance = concat(balance, email); | UPDATE_CONCAT | true |
DIFF00000003237 | general_code_change | TypeScript | events_165.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 |
DIFF00000003238 | orm_schema_change | TypeScript | invoices_747.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Refunds { // removed field: priority } | NONE | true |
DIFF00000003239 | raw_sql_safe | SQL | inventory_17.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_amount ON notifications (phone); | NONE | false |
DIFF00000003240 | raw_sql_destructive | SQL | invoices_811.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000003241 | general_code_change | Go | refunds_408.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003242 | orm_schema_change | TypeScript | comments_371.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Payments { // removed field: name } | NONE | true |
DIFF00000003243 | orm_schema_change | TypeScript | sessions_918.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Users { // removed field: status } | NONE | true |
DIFF00000003244 | orm_schema_change | JavaScript | tickets_661.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('payments', table => table.dropColumn('metadata')) | NONE | true |
DIFF00000003245 | raw_sql_destructive | SQL | accounts_943.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00000003246 | raw_sql_safe | SQL | payments_550.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE events SET address = %s WHERE role = %s; | NONE | false |
DIFF00000003247 | raw_sql_safe | SQL | users_363.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE amount = 'active'; | NONE | false |
DIFF00000003248 | raw_sql_destructive | SQL | shipments_985.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00000003249 | general_code_change | JavaScript | accounts_739.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 |
DIFF00000003250 | raw_sql_destructive | SQL | events_414.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000003251 | raw_sql_safe | SQL | payments_365.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_notifications_name ON notifications (quantity); | NONE | false |
DIFF00000003252 | general_code_change | Python | transactions_792.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003253 | mentioned_in_comment | Python | invoices_404.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE notifications; -- now deprecated""" | TRUNCATE | false |
DIFF00000003254 | general_code_change | JavaScript | users_887.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003255 | obfuscated_destructive | SQL | customers_786.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
subscriptions; | DELETE_UNQUALIFIED | true |
DIFF00000003256 | general_code_change | TypeScript | users_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 |
DIFF00000003257 | raw_sql_safe | SQL | reviews_83.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE logs ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000003258 | mentioned_in_comment | Python | users_996.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE subscriptions DROP COLUMN role; -- now deprecated""" | DROP_COLUMN | false |
DIFF00000003259 | mentioned_in_comment | Python | accounts_148.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE logs; -- now deprecated""" | TRUNCATE | false |
DIFF00000003260 | general_code_change | TypeScript | notifications_72.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 |
DIFF00000003261 | obfuscated_destructive | SQL | events_862.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE products DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00000003262 | raw_sql_destructive | SQL | reviews_953.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE inventory SET phone = CONCAT(phone, updated_at); | UPDATE_CONCAT | true |
DIFF00000003263 | raw_sql_safe | SQL | logs_891.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (phone, description) VALUES (%s, %s); | NONE | false |
DIFF00000003264 | general_code_change | Go | events_978.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003265 | raw_sql_safe | SQL | tickets_982.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_invoices_balance ON invoices (amount); | NONE | false |
DIFF00000003266 | raw_sql_safe | SQL | invoices_453.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO reviews (status, address) VALUES (%s, %s); | NONE | false |
DIFF00000003267 | mentioned_in_comment | Python | invoices_806.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DELETE FROM transactions;' manually, handled by migration tool | DELETE_UNQUALIFIED | false |
DIFF00000003268 | test_suite_cleanup | SQL | tests/employees_412.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM payments; | DELETE_UNQUALIFIED | false |
DIFF00000003269 | test_suite_cleanup | SQL | spec/invoices_416.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE events; | TRUNCATE | false |
DIFF00000003270 | test_suite_cleanup | SQL | test/refunds_153.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000003271 | general_code_change | Java | tickets_346.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003272 | raw_sql_safe | SQL | refunds_374.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000003273 | orm_schema_change | JavaScript | comments_365.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('metadata')) | NONE | true |
DIFF00000003274 | orm_schema_change | TypeScript | invoices_86.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Employees { // removed field: address } | NONE | true |
DIFF00000003275 | orm_schema_change | Python | customers_980.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='reviews', name='price') | NONE | true |
DIFF00000003276 | mentioned_in_comment | Python | notifications_958.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE refunds RENAME COLUMN metadata TO user_role;") | ALTER_RENAME | false |
DIFF00000003277 | raw_sql_safe | SQL | subscriptions_184.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE events ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00000003278 | general_code_change | Go | orders_735.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003279 | test_suite_cleanup | SQL | spec/logs_109.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments RENAME COLUMN email TO user_role; | ALTER_RENAME | false |
DIFF00000003280 | test_suite_cleanup | SQL | mysql-test/suite/shipments_632.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE orders; | TRUNCATE | false |
DIFF00000003281 | obfuscated_destructive | SQL | accounts_513.sql | schema cleanup | @@ -1,3 +1,3 @@
+dROP TAblE REVIEws; | DROP_TABLE | true |
DIFF00000003282 | test_suite_cleanup | SQL | spec/products_21.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | false |
DIFF00000003283 | raw_sql_destructive | SQL | shipments_921.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE events; | DROP_TABLE | true |
DIFF00000003284 | test_suite_cleanup | SQL | tests/logs_779.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE comments SET order_id = CONCAT(order_id, status); | UPDATE_CONCAT | false |
DIFF00000003285 | general_code_change | TypeScript | logs_738.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 |
DIFF00000003286 | obfuscated_destructive | SQL | shipments_567.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
subscriptions
DROP
COLUMN
phone; | DROP_COLUMN | true |
DIFF00000003287 | general_code_change | Python | refunds_192.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003288 | raw_sql_safe | SQL | users_960.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_comments_order_id ON comments (updated_at); | NONE | false |
DIFF00000003289 | obfuscated_destructive | SQL | subscriptions_941.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from logs; | DELETE_UNQUALIFIED | true |
DIFF00000003290 | general_code_change | JavaScript | products_366.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003291 | orm_schema_change | Python | shipments_490.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='email') | NONE | true |
DIFF00000003292 | raw_sql_destructive | SQL | orders_936.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00000003293 | general_code_change | Python | products_263.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003294 | general_code_change | Go | users_258.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003295 | raw_sql_destructive | SQL | customers_342.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE reviews DROP COLUMN email; | DROP_COLUMN | true |
DIFF00000003296 | general_code_change | Go | events_994.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003297 | raw_sql_safe | SQL | logs_564.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM refunds WHERE user_id = 'active'; | NONE | false |
DIFF00000003298 | raw_sql_safe | SQL | transactions_557.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO logs (price, email) VALUES (%s, %s); | NONE | false |
DIFF00000003299 | general_code_change | JavaScript | events_536.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.