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 |
|---|---|---|---|---|---|---|---|
DIFF00099997800 | orm_schema_change | JavaScript | sessions_493.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('products', 'updated_at') | NONE | true |
DIFF00099997801 | orm_schema_change | JavaScript | employees_521.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('user_id')) | NONE | true |
DIFF00099997802 | orm_schema_change | TypeScript | customers_184.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Customers { // removed field: score } | NONE | true |
DIFF00099997803 | obfuscated_destructive | SQL | inventory_57.sql | schema cleanup | @@ -1,3 +1,3 @@
+drop table employees; | DROP_TABLE | true |
DIFF00099997804 | raw_sql_destructive | SQL | sessions_118.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE tickets; | DROP_TABLE | true |
DIFF00099997805 | obfuscated_destructive | SQL | transactions_228.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from customers; | DELETE_UNQUALIFIED | true |
DIFF00099997806 | raw_sql_safe | SQL | transactions_926.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_is_active ON payments (score); | NONE | false |
DIFF00099997807 | orm_schema_change | Python | subscriptions_238.py | django migration: drop unused field | @@ -1,3 +1,3 @@
+migrations.RemoveField(model_name='orders', name='balance') | NONE | true |
DIFF00099997808 | raw_sql_safe | SQL | reviews_179.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_description ON transactions (address); | NONE | false |
DIFF00099997809 | raw_sql_destructive | SQL | events_251.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE comments SET order_id = CONCAT(order_id, updated_at); | UPDATE_CONCAT | true |
DIFF00099997810 | raw_sql_destructive | SQL | orders_585.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE notifications DROP COLUMN order_id; | DROP_COLUMN | true |
DIFF00099997811 | raw_sql_safe | SQL | payments_881.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_payments_email ON payments (phone); | NONE | false |
DIFF00099997812 | raw_sql_destructive | SQL | shipments_452.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE transactions; | DROP_TABLE | true |
DIFF00099997813 | raw_sql_safe | SQL | employees_751.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO reviews (quantity, score) VALUES (%s, %s); | NONE | false |
DIFF00099997814 | raw_sql_destructive | SQL | users_207.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE shipments SET address = CONCAT(address, amount); | UPDATE_CONCAT | true |
DIFF00099997815 | general_code_change | Go | inventory_497.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997816 | general_code_change | JavaScript | notifications_505.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 |
DIFF00099997817 | obfuscated_destructive | SQL | refunds_921.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table users drop column price; | DROP_COLUMN | true |
DIFF00099997818 | test_suite_cleanup | SQL | test/orders_467.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE logs; | DROP_TABLE | false |
DIFF00099997819 | general_code_change | Ruby | reviews_882.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997820 | obfuscated_destructive | SQL | transactions_40.sql | schema cleanup | @@ -1,3 +1,3 @@
+truncate table inventory; | TRUNCATE | true |
DIFF00099997821 | general_code_change | Go | invoices_262.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997822 | raw_sql_safe | SQL | comments_245.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE comments ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099997823 | test_suite_cleanup | SQL | tests/payments_665.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE accounts; | TRUNCATE | false |
DIFF00099997824 | test_suite_cleanup | SQL | mysql-test/suite/customers_274.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE notifications RENAME COLUMN quantity TO amount_cents; | ALTER_RENAME | false |
DIFF00099997825 | raw_sql_destructive | SQL | transactions_158.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE orders RENAME COLUMN amount TO contact_email; | ALTER_RENAME | true |
DIFF00099997826 | raw_sql_safe | SQL | reviews_646.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE transactions ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997827 | general_code_change | JavaScript | payments_553.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997828 | obfuscated_destructive | SQL | logs_441.sql | schema cleanup | @@ -1,3 +1,3 @@
+DELETE
FROM
orders; | DELETE_UNQUALIFIED | true |
DIFF00099997829 | mentioned_in_comment | Python | events_540.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: TRUNCATE TABLE employees;") | TRUNCATE | false |
DIFF00099997830 | orm_schema_change | JavaScript | products_283.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('users', table => table.dropColumn('balance')) | NONE | true |
DIFF00099997831 | orm_schema_change | JavaScript | logs_856.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('events', table => table.dropColumn('metadata')) | NONE | true |
DIFF00099997832 | raw_sql_destructive | SQL | events_611.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE employees SET balance = CONCAT(balance, email); | UPDATE_CONCAT | true |
DIFF00099997833 | orm_schema_change | Ruby | payments_796.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :transactions, :address | NONE | true |
DIFF00099997834 | raw_sql_safe | SQL | payments_545.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (email, quantity) VALUES (%s, %s); | NONE | false |
DIFF00099997835 | test_suite_cleanup | SQL | mysql-test/suite/orders_986.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+ALTER TABLE employees RENAME COLUMN user_id TO full_name; | ALTER_RENAME | false |
DIFF00099997836 | test_suite_cleanup | SQL | tests/tickets_270.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE products; | TRUNCATE | false |
DIFF00099997837 | raw_sql_safe | SQL | customers_350.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_tickets_email ON tickets (phone); | NONE | false |
DIFF00099997838 | general_code_change | JavaScript | tickets_477.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997839 | raw_sql_safe | SQL | customers_272.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM shipments WHERE balance = 'active'; | NONE | false |
DIFF00099997840 | mentioned_in_comment | Python | shipments_872.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'UPDATE subscriptions SET user_id = CONCAT(user_id, order_id);' manually, handled by migration tool | UPDATE_CONCAT | false |
DIFF00099997841 | raw_sql_safe | SQL | customers_299.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM reviews WHERE created_at = 'active'; | NONE | false |
DIFF00099997842 | general_code_change | JavaScript | invoices_304.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997843 | raw_sql_safe | SQL | shipments_931.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+SELECT * FROM orders WHERE order_id = 'active'; | NONE | false |
DIFF00099997844 | general_code_change | TypeScript | products_168.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 |
DIFF00099997845 | orm_schema_change | Ruby | sessions_278.rb | rails migration: drop unused field | @@ -1,3 +1,3 @@
+remove_column :products, :created_at | NONE | true |
DIFF00099997846 | obfuscated_destructive | SQL | employees_408.sql | schema cleanup | @@ -1,3 +1,3 @@
+delete from employees; | DELETE_UNQUALIFIED | true |
DIFF00099997847 | general_code_change | Ruby | inventory_209.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997848 | mentioned_in_comment | Python | customers_675.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DELETE FROM logs; -- now deprecated""" | DELETE_UNQUALIFIED | false |
DIFF00099997849 | general_code_change | Go | accounts_401.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997850 | orm_schema_change | JavaScript | sessions_769.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('inventory', table => table.dropColumn('email')) | NONE | true |
DIFF00099997851 | obfuscated_destructive | SQL | subscriptions_303.sql | schema cleanup | @@ -1,3 +1,3 @@
+AltER tabLE reViews dRop ColUMn CreatEd_AT; | DROP_COLUMN | true |
DIFF00099997852 | obfuscated_destructive | SQL | shipments_458.sql | schema cleanup | @@ -1,3 +1,3 @@
+DrOP tABLe sHIpMENTS; | DROP_TABLE | true |
DIFF00099997853 | mentioned_in_comment | Python | transactions_298.py | add warning comment | @@ -1,3 +1,3 @@
+logger.warning("Skipping legacy query: ALTER TABLE sessions RENAME COLUMN balance TO contact_email;") | ALTER_RENAME | false |
DIFF00099997854 | orm_schema_change | JavaScript | accounts_572.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('accounts', table => table.dropColumn('role')) | NONE | true |
DIFF00099997855 | test_suite_cleanup | SQL | tests/employees_153.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+DROP TABLE refunds; | DROP_TABLE | false |
DIFF00099997856 | orm_schema_change | TypeScript | refunds_415.ts | prisma migration: drop unused field | @@ -1,3 +1,3 @@
+model Accounts { // removed field: priority } | NONE | true |
DIFF00099997857 | mentioned_in_comment | Python | orders_673.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE accounts; -- now deprecated""" | DROP_TABLE | false |
DIFF00099997858 | general_code_change | Ruby | users_100.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997859 | raw_sql_destructive | SQL | accounts_976.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE sessions DROP COLUMN created_at; | DROP_COLUMN | true |
DIFF00099997860 | general_code_change | Ruby | employees_145.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997861 | raw_sql_destructive | SQL | shipments_560.sql | update schema | @@ -1,3 +1,3 @@
+ALTER TABLE subscriptions RENAME COLUMN category TO contact_email; | ALTER_RENAME | true |
DIFF00099997862 | mentioned_in_comment | Python | logs_13.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE events RENAME COLUMN priority TO full_name; -- now deprecated""" | ALTER_RENAME | false |
DIFF00099997863 | raw_sql_destructive | SQL | notifications_898.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | true |
DIFF00099997864 | orm_schema_change | JavaScript | subscriptions_141.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('customers', 'email') | NONE | true |
DIFF00099997865 | orm_schema_change | JavaScript | users_857.js | knex migration: drop unused field | @@ -1,3 +1,3 @@
+knex.schema.table('comments', table => table.dropColumn('score')) | NONE | true |
DIFF00099997866 | general_code_change | TypeScript | refunds_928.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 |
DIFF00099997867 | raw_sql_safe | SQL | customers_45.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE products ADD COLUMN amount_cents VARCHAR(255); | NONE | false |
DIFF00099997868 | mentioned_in_comment | Python | notifications_150.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'ALTER TABLE refunds RENAME COLUMN updated_at TO state;' manually, handled by migration tool | ALTER_RENAME | false |
DIFF00099997869 | general_code_change | Python | users_982.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997870 | raw_sql_destructive | SQL | refunds_481.sql | update schema | @@ -1,3 +1,3 @@
+TRUNCATE TABLE shipments; | TRUNCATE | true |
DIFF00099997871 | obfuscated_destructive | SQL | payments_194.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER TABLE transactions DROP COLUMN balance; | DROP_COLUMN | true |
DIFF00099997872 | raw_sql_safe | SQL | employees_998.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+CREATE INDEX idx_transactions_priority ON transactions (is_active); | NONE | false |
DIFF00099997873 | orm_schema_change | JavaScript | comments_249.js | sequelize migration: drop unused field | @@ -1,3 +1,3 @@
+queryInterface.removeColumn('users', 'name') | NONE | true |
DIFF00099997874 | general_code_change | Go | reviews_851.go | refactor / feature work | @@ -1,3 +1,3 @@
+func HandleRequest(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "ok") } | NONE | false |
DIFF00099997875 | raw_sql_safe | SQL | payments_281.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE invoices SET is_active = %s WHERE price = %s; | NONE | false |
DIFF00099997876 | test_suite_cleanup | SQL | test/orders_926.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE inventory; | TRUNCATE | false |
DIFF00099997877 | raw_sql_destructive | SQL | employees_245.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE shipments SET order_id = CONCAT(order_id, created_at); | UPDATE_CONCAT | true |
DIFF00099997878 | raw_sql_destructive | SQL | employees_914.sql | update schema | @@ -1,3 +1,3 @@
+UPDATE notifications SET balance = CONCAT(balance, metadata); | UPDATE_CONCAT | true |
DIFF00099997879 | raw_sql_destructive | SQL | inventory_319.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE products; | DROP_TABLE | true |
DIFF00099997880 | raw_sql_destructive | SQL | inventory_301.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE notifications; | DROP_TABLE | true |
DIFF00099997881 | raw_sql_safe | SQL | customers_16.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO tickets (name, phone) VALUES (%s, %s); | NONE | false |
DIFF00099997882 | raw_sql_safe | SQL | events_432.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO notifications (updated_at, email) VALUES (%s, %s); | NONE | false |
DIFF00099997883 | raw_sql_safe | SQL | comments_575.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+ALTER TABLE inventory ADD COLUMN state VARCHAR(255); | NONE | false |
DIFF00099997884 | general_code_change | JavaScript | orders_186.js | refactor / feature work | @@ -1,3 +1,3 @@
+function formatDate(d) { return d.toISOString(); } | NONE | false |
DIFF00099997885 | general_code_change | Python | products_66.py | refactor / feature work | @@ -1,3 +1,3 @@
+class Cache:
def __init__(self):
self._store = {} | NONE | false |
DIFF00099997886 | raw_sql_safe | SQL | products_738.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+UPDATE users SET metadata = %s WHERE user_id = %s; | NONE | false |
DIFF00099997887 | general_code_change | TypeScript | logs_29.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 |
DIFF00099997888 | general_code_change | Python | logs_306.py | refactor / feature work | @@ -1,3 +1,3 @@
+def calculate_total(items):
return sum(i.price for i in items) | NONE | false |
DIFF00099997889 | obfuscated_destructive | SQL | shipments_361.sql | schema cleanup | @@ -1,3 +1,3 @@
+alter table payments drop column price; | DROP_COLUMN | true |
DIFF00099997890 | mentioned_in_comment | Python | inventory_662.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: ALTER TABLE reviews DROP COLUMN created_at; -- now deprecated""" | DROP_COLUMN | false |
DIFF00099997891 | obfuscated_destructive | SQL | inventory_684.sql | schema cleanup | @@ -1,3 +1,3 @@
+ALTER
TABLE
tickets
RENAME
COLUMN
balance
TO
amount_cents; | ALTER_RENAME | true |
DIFF00099997892 | general_code_change | Ruby | subscriptions_449.rb | refactor / feature work | @@ -1,3 +1,3 @@
+def full_name
"#{first_name} #{last_name}"
end | NONE | false |
DIFF00099997893 | test_suite_cleanup | SQL | mysql-test/suite/invoices_725.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+TRUNCATE TABLE invoices; | TRUNCATE | false |
DIFF00099997894 | raw_sql_safe | SQL | users_869.sql | add index / minor schema tweak | @@ -1,3 +1,3 @@
+INSERT INTO products (updated_at, created_at) VALUES (%s, %s); | NONE | false |
DIFF00099997895 | mentioned_in_comment | Python | events_412.py | add warning comment | @@ -1,3 +1,3 @@
+# NOTE: do not run 'DROP TABLE notifications;' manually, handled by migration tool | DROP_TABLE | false |
DIFF00099997896 | mentioned_in_comment | Python | reviews_370.py | add warning comment | @@ -1,3 +1,3 @@
+"""This function used to run: DROP TABLE subscriptions; -- now deprecated""" | DROP_TABLE | false |
DIFF00099997897 | raw_sql_destructive | SQL | customers_836.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE shipments; | DROP_TABLE | true |
DIFF00099997898 | raw_sql_destructive | SQL | subscriptions_527.sql | update schema | @@ -1,3 +1,3 @@
+DROP TABLE comments; | DROP_TABLE | true |
DIFF00099997899 | test_suite_cleanup | SQL | mysql-test/suite/users_765.sql | test cleanup fixture | @@ -1,3 +1,3 @@
+UPDATE products SET updated_at = CONCAT(updated_at, order_id); | UPDATE_CONCAT | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.