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 |
|---|---|---|---|---|---|---|---|
DIFF00000003100 | orm_schema_change | Ruby | invoices_212.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :is_active | NONE | true |
DIFF00000003101 | raw_sql_safe | SQL | invoices_281.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE notifications SET role = %s WHERE updated_at = %s; | NONE | false |
DIFF00000003102 | raw_sql_safe | SQL | orders_848.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE reviews SET description = %s WHERE phone = %s; | NONE | false |
DIFF00000003103 | orm_schema_change | JavaScript | events_599.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('transactions', table => table.dropColumn('metadata')) | NONE | true |
DIFF00000003104 | raw_sql_safe | SQL | reviews_731.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_is_active ON transactions (metadata); | NONE | false |
DIFF00000003105 | raw_sql_destructive | SQL | inventory_914.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders DROP COLUMN category; | DROP_COLUMN | true |
DIFF00000003106 | general_code_change | Python | subscriptions_391.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003107 | general_code_change | Python | reviews_742.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003108 | raw_sql_destructive | SQL | logs_364.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE sessions; | DROP_TABLE | true |
DIFF00000003109 | general_code_change | Python | products_532.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003110 | raw_sql_destructive | SQL | accounts_940.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE products SET role = CONCAT(role, amount); | UPDATE_CONCAT | true |
DIFF00000003111 | obfuscated_destructive | SQL | invoices_193.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
sessions; | DELETE_UNQUALIFIED | true |
DIFF00000003112 | general_code_change | Go | sessions_874.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003113 | orm_schema_change | JavaScript | logs_250.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('shipments', table => table.dropColumn('quantity')) | NONE | true |
DIFF00000003114 | test_suite_cleanup | SQL | mysql-test/suite/employees_522.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM reviews; | DELETE_UNQUALIFIED | false |
DIFF00000003115 | raw_sql_destructive | SQL | users_97.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | true |
DIFF00000003116 | mentioned_in_comment | Python | subscriptions_334.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: UPDATE sessions SET is_active = CONCAT(is_active, updated_at); -- now deprecated""" | UPDATE_CONCAT | false |
DIFF00000003117 | general_code_change | Python | orders_435.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003118 | orm_schema_change | Python | tickets_362.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='subscriptions', name='user_id') | NONE | true |
DIFF00000003119 | general_code_change | Python | orders_944.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000003120 | orm_schema_change | TypeScript | events_902.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: category } | NONE | true |
DIFF00000003121 | raw_sql_safe | SQL | users_452.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET phone = %s WHERE status = %s; | NONE | false |
DIFF00000003122 | raw_sql_safe | SQL | orders_76.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000003123 | raw_sql_safe | SQL | sessions_703.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (price, created_at) VALUES (%s, %s); | NONE | false |
DIFF00000003124 | general_code_change | Python | orders_813.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003125 | raw_sql_destructive | SQL | refunds_827.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE invoices; | DROP_TABLE | true |
DIFF00000003126 | mentioned_in_comment | Python | employees_353.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE refunds DROP COLUMN quantity;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000003127 | general_code_change | Java | transactions_493.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003128 | orm_schema_change | JavaScript | accounts_387.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('events', 'user_id') | NONE | true |
DIFF00000003129 | obfuscated_destructive | SQL | invoices_685.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00000003130 | general_code_change | Java | tickets_476.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003131 | test_suite_cleanup | SQL | test/invoices_773.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM events; | DELETE_UNQUALIFIED | false |
DIFF00000003132 | general_code_change | Python | employees_429.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003133 | orm_schema_change | Python | customers_320.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='description') | NONE | true |
DIFF00000003134 | general_code_change | JavaScript | employees_165.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003135 | raw_sql_destructive | SQL | subscriptions_183.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE payments RENAME COLUMN is_active TO amount_cents; | ALTER_RENAME | true |
DIFF00000003136 | general_code_change | Java | sessions_488.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003137 | general_code_change | Python | invoices_565.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000003138 | raw_sql_safe | SQL | employees_908.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (metadata, description) VALUES (%s, %s); | NONE | false |
DIFF00000003139 | obfuscated_destructive | SQL | logs_773.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
products; | DROP_TABLE | true |
DIFF00000003140 | orm_schema_change | JavaScript | notifications_309.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('employees', 'role') | NONE | true |
DIFF00000003141 | test_suite_cleanup | SQL | mysql-test/suite/comments_498.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE events RENAME COLUMN created_at TO amount_cents; | ALTER_RENAME | false |
DIFF00000003142 | raw_sql_safe | SQL | products_357.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO invoices (category, quantity) VALUES (%s, %s); | NONE | false |
DIFF00000003143 | obfuscated_destructive | SQL | subscriptions_300.sql | schema cleanup | @@ -1,3 +1,3 @@
+alTEr TaBLe pAYmeNTs renAmE colUMn PHOne TO StATe; | ALTER_RENAME | true |
DIFF00000003144 | mentioned_in_comment | Python | employees_763.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE accounts; -- now deprecated""" | DROP_TABLE | false |
DIFF00000003145 | test_suite_cleanup | SQL | mysql-test/suite/notifications_630.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET description = CONCAT(description, balance); | UPDATE_CONCAT | false |
DIFF00000003146 | raw_sql_destructive | SQL | invoices_462.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000003147 | orm_schema_change | JavaScript | logs_601.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('amount')) | NONE | true |
DIFF00000003148 | raw_sql_safe | SQL | accounts_917.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO employees (order_id, email) VALUES (%s, %s); | NONE | false |
DIFF00000003149 | general_code_change | JavaScript | users_932.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 |
DIFF00000003150 | general_code_change | Java | transactions_646.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003151 | obfuscated_destructive | SQL | logs_947.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN status; | DROP_COLUMN | true |
DIFF00000003152 | test_suite_cleanup | SQL | spec/payments_510.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE inventory; | DROP_TABLE | false |
DIFF00000003153 | orm_schema_change | Python | customers_106.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='payments', name='phone') | NONE | true |
DIFF00000003154 | test_suite_cleanup | SQL | mysql-test/suite/invoices_447.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | false |
DIFF00000003155 | obfuscated_destructive | SQL | logs_43.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE orders; | DROP_TABLE | true |
DIFF00000003156 | raw_sql_destructive | SQL | comments_168.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM employees; | DELETE_UNQUALIFIED | true |
DIFF00000003157 | orm_schema_change | TypeScript | events_479.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: price } | NONE | true |
DIFF00000003158 | orm_schema_change | JavaScript | sessions_104.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('metadata')) | NONE | true |
DIFF00000003159 | mentioned_in_comment | Python | reviews_977.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE shipments RENAME COLUMN created_at TO contact_email;") | ALTER_RENAME | false |
DIFF00000003160 | 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 |
DIFF00000003161 | obfuscated_destructive | SQL | customers_889.sql | schema cleanup | @@ -1,3 +1,3 @@
+UPDATE
refunds
SET
email
=
CONCAT(email,
amount); | UPDATE_CONCAT | true |
DIFF00000003162 | orm_schema_change | JavaScript | invoices_399.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('sessions', table => table.dropColumn('phone')) | NONE | true |
DIFF00000003163 | orm_schema_change | Python | reviews_565.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='products', name='role') | NONE | true |
DIFF00000003164 | test_suite_cleanup | SQL | mysql-test/suite/accounts_187.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE shipments DROP COLUMN amount; | DROP_COLUMN | false |
DIFF00000003165 | raw_sql_destructive | SQL | tickets_282.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM inventory; | DELETE_UNQUALIFIED | true |
DIFF00000003166 | obfuscated_destructive | SQL | products_655.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM comments; | DELETE_UNQUALIFIED | true |
DIFF00000003167 | orm_schema_change | TypeScript | events_636.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Reviews { // removed field: email } | NONE | true |
DIFF00000003168 | obfuscated_destructive | SQL | inventory_200.sql | schema cleanup | @@ -1,3 +1,3 @@
+TrUNCatE TABLE SESsIoNs; | TRUNCATE | true |
DIFF00000003169 | orm_schema_change | Python | inventory_262.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='order_id') | NONE | true |
DIFF00000003170 | general_code_change | Go | transactions_938.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003171 | raw_sql_destructive | SQL | subscriptions_268.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE inventory DROP COLUMN updated_at; | DROP_COLUMN | true |
DIFF00000003172 | general_code_change | JavaScript | events_48.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003173 | raw_sql_safe | SQL | transactions_114.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE tickets ADD COLUMN contact_email VARCHAR(255); | NONE | false |
DIFF00000003174 | mentioned_in_comment | Python | users_822.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE comments; -- now deprecated""" | TRUNCATE | false |
DIFF00000003175 | general_code_change | Go | payments_835.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003176 | general_code_change | JavaScript | transactions_174.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003177 | general_code_change | Java | accounts_192.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003178 | mentioned_in_comment | Python | refunds_543.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE sessions SET status = CONCAT(status, created_at);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000003179 | raw_sql_safe | SQL | reviews_791.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE updated_at = 'active'; | NONE | false |
DIFF00000003180 | raw_sql_destructive | SQL | invoices_568.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE payments SET email = CONCAT(email, phone); | UPDATE_CONCAT | true |
DIFF00000003181 | obfuscated_destructive | SQL | invoices_450.sql | schema cleanup | @@ -1,3 +1,3 @@
+update notifications set metadata = concat(metadata, amount); | UPDATE_CONCAT | true |
DIFF00000003182 | mentioned_in_comment | Python | events_17.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE refunds SET email = CONCAT(email, status);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00000003183 | orm_schema_change | Python | orders_80.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='events', name='name') | NONE | true |
DIFF00000003184 | orm_schema_change | TypeScript | sessions_939.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Orders { // removed field: order_id } | NONE | true |
DIFF00000003185 | obfuscated_destructive | SQL | comments_165.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
reviews; | DELETE_UNQUALIFIED | true |
DIFF00000003186 | test_suite_cleanup | SQL | test/tickets_145.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE customers RENAME COLUMN description TO user_role; | ALTER_RENAME | false |
DIFF00000003187 | obfuscated_destructive | SQL | subscriptions_491.sql | schema cleanup | @@ -1,3 +1,3 @@
+aLTer table shiPmeNTS REnaMe ColUMn upDaTED_at to fULl_NaME; | ALTER_RENAME | true |
DIFF00000003188 | raw_sql_destructive | SQL | reviews_417.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE transactions RENAME COLUMN is_active TO contact_email; | ALTER_RENAME | true |
DIFF00000003189 | obfuscated_destructive | SQL | reviews_352.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP
TABLE
payments; | DROP_TABLE | true |
DIFF00000003190 | general_code_change | Go | shipments_744.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003191 | general_code_change | TypeScript | users_588.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 |
DIFF00000003192 | general_code_change | Java | comments_550.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000003193 | general_code_change | JavaScript | subscriptions_223.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000003194 | obfuscated_destructive | SQL | transactions_178.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
sessions
RENAME
COLUMN
priority
TO
full_name; | ALTER_RENAME | true |
DIFF00000003195 | raw_sql_destructive | SQL | subscriptions_854.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN name TO user_role; | ALTER_RENAME | true |
DIFF00000003196 | general_code_change | Go | products_189.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000003197 | raw_sql_destructive | SQL | refunds_614.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE transactions; | TRUNCATE | true |
DIFF00000003198 | orm_schema_change | JavaScript | refunds_861.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('orders', 'priority') | NONE | true |
DIFF00000003199 | raw_sql_destructive | SQL | notifications_368.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.