Skip to content

Commit 9d3f173

Browse files
committed
Added missing migration for StartVM cleanup
An old tool object was left in the DB, following the code cleanup committed earlier this month.
1 parent 6b5b70e commit 9d3f173

File tree

2 files changed

+39
-7
lines changed

2 files changed

+39
-7
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
#
3+
# CBRAIN Project
4+
#
5+
# Copyright (C) 2008-2025
6+
# The Royal Institution for the Advancement of Learning
7+
# McGill University
8+
#
9+
# This program is free software: you can redistribute it and/or modify
10+
# it under the terms of the GNU General Public License as published by
11+
# the Free Software Foundation, either version 3 of the License, or
12+
# (at your option) any later version.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
#
22+
23+
class EraseOldStartVmTool < ActiveRecord::Migration[5.0]
24+
25+
def up
26+
Tool.where(:cbrain_task_class_name => 'CbrainTask::StartVM').delete_all
27+
end
28+
29+
def down
30+
true
31+
end
32+
33+
end

BrainPortal/db/schema.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
14-
ActiveRecord::Schema.define(version: 20250512122948) do
13+
ActiveRecord::Schema.define(version: 20250526170331) do
1514

1615
create_table "access_profiles", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci" do |t|
1716
t.string "name", null: false
@@ -228,17 +227,17 @@
228227

229228
create_table "messages", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci" do |t|
230229
t.string "header"
231-
t.text "description", limit: 65535
232-
t.text "variable_text", limit: 65535
230+
t.text "description", limit: 65535
231+
t.text "variable_text", limit: 65535
233232
t.string "message_type"
234-
t.boolean "read", default: false, null: false
233+
t.boolean "read", default: false, null: false
235234
t.integer "user_id"
236235
t.datetime "expiry"
237236
t.datetime "created_at"
238237
t.datetime "updated_at"
239238
t.datetime "last_sent"
240-
t.boolean "critical", default: false, null: false
241-
t.boolean "display", default: false, null: false
239+
t.boolean "critical", default: false, null: false
240+
t.boolean "display", default: false, null: false
242241
t.integer "invitation_group_id"
243242
t.string "type"
244243
t.boolean "active"

0 commit comments

Comments
 (0)