⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upgrade.sql

📁 Bug管理系统
💻 SQL
字号:
-- Run this, or portions of this, to upgrade from one
-- version to another.

-- upgrade from 2.0.6 to 2.0.7
alter table bug_attachments add ba_comment int null

/*
The SQL below might be something you want to try.  It attempts to guess
the relationship of an attachment to a comment by looking at how 
close in time they were added.  If it's just a couple seconds a part,
I assume they are related.   For me, where I have just a few users
on the system, this heuristic makes sense.   I wouldn't use it if
I had a lot of users.
*/

/*
select ba_id, bc_id 
into #t 
from bug_attachments
inner join bug_comments on ba_bug = bc_bug and 
abs(datediff(s,ba_uploaded_date, bc_date)) < 4  -- 3 seconds or less

update bug_attachments
set ba_comment = #t.bc_id
from #t where bug_attachments.ba_id = #t.ba_id

drop table #t

*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -