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 |
|---|---|---|---|---|---|---|---|
DIFF00000001100 | raw_sql_destructive | SQL | logs_846.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE invoices RENAME COLUMN created_at TO amount_cents; | ALTER_RENAME | true |
DIFF00000001101 | general_code_change | Python | shipments_87.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001102 | test_suite_cleanup | SQL | spec/accounts_596.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | false |
DIFF00000001103 | mentioned_in_comment | Python | payments_91.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE shipments DROP COLUMN email;' manually, handled by migration tool | DROP_COLUMN | false |
DIFF00000001104 | mentioned_in_comment | Python | shipments_493.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DELETE FROM users;") | DELETE_UNQUALIFIED | false |
DIFF00000001105 | general_code_change | Java | invoices_155.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001106 | test_suite_cleanup | SQL | test/logs_85.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE employees SET user_id = CONCAT(user_id, phone); | UPDATE_CONCAT | false |
DIFF00000001107 | general_code_change | Ruby | tickets_649.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001108 | raw_sql_destructive | SQL | reviews_345.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00000001109 | orm_schema_change | Ruby | subscriptions_770.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :comments, :phone | NONE | true |
DIFF00000001110 | general_code_change | JavaScript | tickets_811.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001111 | mentioned_in_comment | Python | sessions_868.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE sessions RENAME COLUMN user_id TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00000001112 | raw_sql_safe | SQL | notifications_306.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_inventory_price ON inventory (email); | NONE | false |
DIFF00000001113 | general_code_change | Python | tickets_994.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001114 | orm_schema_change | JavaScript | comments_20.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('comments', 'name') | NONE | true |
DIFF00000001115 | mentioned_in_comment | Python | tickets_636.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE notifications;") | DROP_TABLE | false |
DIFF00000001116 | raw_sql_destructive | SQL | logs_296.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE customers; | TRUNCATE | true |
DIFF00000001117 | general_code_change | Python | payments_371.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00000001118 | obfuscated_destructive | SQL | logs_642.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table notifications rename column name to contact_email; | ALTER_RENAME | true |
DIFF00000001119 | general_code_change | Go | users_19.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001120 | general_code_change | Python | accounts_683.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001121 | raw_sql_safe | SQL | invoices_649.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE payments ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000001122 | obfuscated_destructive | SQL | products_844.sql | schema cleanup | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00000001123 | obfuscated_destructive | SQL | refunds_438.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM sessions; | DELETE_UNQUALIFIED | true |
DIFF00000001124 | raw_sql_safe | SQL | shipments_118.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM events WHERE status = 'active'; | NONE | false |
DIFF00000001125 | orm_schema_change | JavaScript | inventory_607.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('employees', table => table.dropColumn('email')) | NONE | true |
DIFF00000001126 | orm_schema_change | JavaScript | reviews_255.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('tickets', 'updated_at') | NONE | true |
DIFF00000001127 | mentioned_in_comment | Python | subscriptions_318.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM shipments; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001128 | orm_schema_change | JavaScript | transactions_344.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('refunds', table => table.dropColumn('updated_at')) | NONE | true |
DIFF00000001129 | raw_sql_safe | SQL | users_88.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO accounts (metadata, email) VALUES (%s, %s); | NONE | false |
DIFF00000001130 | raw_sql_safe | SQL | accounts_283.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE sessions ADD COLUMN user_role VARCHAR(255); | NONE | false |
DIFF00000001131 | obfuscated_destructive | SQL | tickets_1.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE FROM logs; | DELETE_UNQUALIFIED | true |
DIFF00000001132 | raw_sql_safe | SQL | payments_517.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO payments (priority, amount) VALUES (%s, %s); | NONE | false |
DIFF00000001133 | test_suite_cleanup | SQL | mysql-test/suite/inventory_731.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN balance; | DROP_COLUMN | false |
DIFF00000001134 | raw_sql_destructive | SQL | tickets_319.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE users; | DROP_TABLE | true |
DIFF00000001135 | raw_sql_safe | SQL | tickets_994.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE sessions SET address = %s WHERE address = %s; | NONE | false |
DIFF00000001136 | raw_sql_safe | SQL | employees_952.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM products WHERE address = 'active'; | NONE | false |
DIFF00000001137 | orm_schema_change | Python | employees_404.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='name') | NONE | true |
DIFF00000001138 | raw_sql_safe | SQL | employees_685.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_category ON tickets (status); | NONE | false |
DIFF00000001139 | general_code_change | JavaScript | refunds_233.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001140 | raw_sql_safe | SQL | accounts_692.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM sessions WHERE is_active = 'active'; | NONE | false |
DIFF00000001141 | general_code_change | JavaScript | notifications_325.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001142 | orm_schema_change | Python | notifications_933.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='customers', name='order_id') | NONE | true |
DIFF00000001143 | general_code_change | JavaScript | events_977.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 |
DIFF00000001144 | test_suite_cleanup | SQL | tests/accounts_64.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | false |
DIFF00000001145 | orm_schema_change | TypeScript | invoices_623.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Notifications { // removed field: score } | NONE | true |
DIFF00000001146 | raw_sql_destructive | SQL | products_53.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE notifications; | TRUNCATE | true |
DIFF00000001147 | raw_sql_destructive | SQL | invoices_451.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE transactions SET amount = CONCAT(amount, is_active); | UPDATE_CONCAT | true |
DIFF00000001148 | general_code_change | Python | tickets_183.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001149 | general_code_change | JavaScript | refunds_611.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00000001150 | general_code_change | Python | inventory_863.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001151 | raw_sql_safe | SQL | users_22.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE accounts SET metadata = %s WHERE user_id = %s; | NONE | false |
DIFF00000001152 | raw_sql_safe | SQL | logs_411.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE inventory SET description = %s WHERE priority = %s; | NONE | false |
DIFF00000001153 | raw_sql_safe | SQL | invoices_271.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO orders (amount, address) VALUES (%s, %s); | NONE | false |
DIFF00000001154 | orm_schema_change | JavaScript | shipments_359.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'quantity') | NONE | true |
DIFF00000001155 | general_code_change | Java | subscriptions_191.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001156 | obfuscated_destructive | SQL | payments_270.sql | schema cleanup | @@ -1,3 +1,3 @@
+update transactions set priority = concat(priority, email); | UPDATE_CONCAT | true |
DIFF00000001157 | mentioned_in_comment | Python | reviews_245.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: DROP TABLE payments;") | DROP_TABLE | false |
DIFF00000001158 | raw_sql_destructive | SQL | customers_617.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | true |
DIFF00000001159 | mentioned_in_comment | Python | tickets_629.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'TRUNCATE TABLE sessions;' manually, handled by migration tool | TRUNCATE | false |
DIFF00000001160 | raw_sql_safe | SQL | tickets_749.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM employees WHERE price = 'active'; | NONE | false |
DIFF00000001161 | general_code_change | Ruby | transactions_604.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001162 | raw_sql_destructive | SQL | inventory_467.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE invoices SET updated_at = CONCAT(updated_at, updated_at); | UPDATE_CONCAT | true |
DIFF00000001163 | obfuscated_destructive | SQL | employees_623.sql | schema cleanup | @@ -1,3 +1,3 @@
+TRUNCATE
TABLE
payments; | TRUNCATE | true |
DIFF00000001164 | test_suite_cleanup | SQL | tests/logs_329.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE logs SET category = CONCAT(category, balance); | UPDATE_CONCAT | false |
DIFF00000001165 | raw_sql_destructive | SQL | subscriptions_345.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM accounts; | DELETE_UNQUALIFIED | true |
DIFF00000001166 | raw_sql_destructive | SQL | refunds_131.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE refunds SET quantity = CONCAT(quantity, description); | UPDATE_CONCAT | true |
DIFF00000001167 | raw_sql_destructive | SQL | transactions_896.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE comments DROP COLUMN amount; | DROP_COLUMN | true |
DIFF00000001168 | orm_schema_change | Ruby | notifications_628.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :notifications, :description | NONE | true |
DIFF00000001169 | obfuscated_destructive | SQL | payments_196.sql | schema cleanup | @@ -1,3 +1,3 @@
+deletE From lOgS; | DELETE_UNQUALIFIED | true |
DIFF00000001170 | raw_sql_destructive | SQL | users_674.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM tickets; | DELETE_UNQUALIFIED | true |
DIFF00000001171 | obfuscated_destructive | SQL | comments_214.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table shipments drop column is_active; | DROP_COLUMN | true |
DIFF00000001172 | test_suite_cleanup | SQL | tests/notifications_778.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM customers; | DELETE_UNQUALIFIED | false |
DIFF00000001173 | mentioned_in_comment | Python | notifications_441.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: TRUNCATE TABLE orders; -- now deprecated""" | TRUNCATE | false |
DIFF00000001174 | test_suite_cleanup | SQL | tests/logs_844.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE tickets SET description = CONCAT(description, amount); | UPDATE_CONCAT | false |
DIFF00000001175 | test_suite_cleanup | SQL | test/transactions_598.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE accounts SET phone = CONCAT(phone, address); | UPDATE_CONCAT | false |
DIFF00000001176 | general_code_change | Java | employees_385.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001177 | raw_sql_destructive | SQL | logs_330.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE reviews; | TRUNCATE | true |
DIFF00000001178 | general_code_change | Go | subscriptions_578.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00000001179 | general_code_change | Python | events_580.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00000001180 | test_suite_cleanup | SQL | spec/users_471.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE subscriptions SET balance = CONCAT(balance, priority); | UPDATE_CONCAT | false |
DIFF00000001181 | orm_schema_change | JavaScript | accounts_406.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('accounts', table => table.dropColumn('status')) | NONE | true |
DIFF00000001182 | raw_sql_destructive | SQL | accounts_763.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE refunds; | TRUNCATE | true |
DIFF00000001183 | general_code_change | Ruby | inventory_215.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001184 | test_suite_cleanup | SQL | spec/users_351.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE inventory SET metadata = CONCAT(metadata, price); | UPDATE_CONCAT | false |
DIFF00000001185 | raw_sql_safe | SQL | accounts_15.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE employees ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000001186 | raw_sql_safe | SQL | notifications_868.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (updated_at, is_active) VALUES (%s, %s); | NONE | false |
DIFF00000001187 | orm_schema_change | Python | comments_788.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='invoices', name='address') | NONE | true |
DIFF00000001188 | raw_sql_destructive | SQL | refunds_827.sql | update schema | @@ -1,3 +1,3 @@
+DELETE FROM invoices; | DELETE_UNQUALIFIED | true |
DIFF00000001189 | general_code_change | Ruby | logs_273.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00000001190 | raw_sql_safe | SQL | employees_451.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00000001191 | mentioned_in_comment | Python | invoices_767.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE shipments RENAME COLUMN role TO amount_cents; -- now deprecated""" | ALTER_RENAME | false |
DIFF00000001192 | orm_schema_change | Python | customers_165.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='transactions', name='created_at') | NONE | true |
DIFF00000001193 | orm_schema_change | JavaScript | reviews_294.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('logs', 'quantity') | NONE | true |
DIFF00000001194 | general_code_change | Java | products_554.java | refactor / feature work | @@ -1,3 +1,3 @@
+public class UserService { public User findById(Long id) { return repo.find(id); } } | NONE | false |
DIFF00000001195 | test_suite_cleanup | SQL | spec/users_517.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE tickets; | TRUNCATE | false |
DIFF00000001196 | mentioned_in_comment | Python | notifications_473.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM products; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00000001197 | raw_sql_destructive | SQL | sessions_614.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE subscriptions; | TRUNCATE | true |
DIFF00000001198 | test_suite_cleanup | SQL | tests/logs_531.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DELETE FROM shipments; | DELETE_UNQUALIFIED | false |
DIFF00000001199 | test_suite_cleanup | SQL | test/tickets_389.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE logs DROP COLUMN updated_at; | DROP_COLUMN | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.