Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
22140ced
Коммит
22140ced
создал
Мар 09, 2016
по автору
Douglas Barbosa Alexandre
Просмотр файлов
Remove invalid todos from database
владелец
9e342fb0
Изменения
2
Скрыть пробелы
Построчно
Рядом
db/migrate/20160309140734_fix_todos.rb
0 → 100644
Просмотр файла @
22140ced
class
FixTodos
<
ActiveRecord
::
Migration
def
up
execute
<<-
SQL
DELETE FROM todos
WHERE todos.target_type IN ('Commit', 'ProjectSnippet')
OR NOT EXISTS (
SELECT *
FROM projects
WHERE projects.id = todos.project_id
)
SQL
end
def
down
end
end
db/schema.rb
Просмотр файла @
22140ced
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2016030
5220806
)
do
ActiveRecord
::
Schema
.
define
(
version:
2016030
9140734
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать