From 67a95ac7e92881249f5729f0fa9e7c9f9f95fff2 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 13 Sep 2017 14:35:49 +0100 Subject: [PATCH 1/1] Remove created_at / updated_at column definitions since these duplicate t.timestamps --- db/migrate/20160822153055_create_issues_and_reports.rb | 6 ------ db/migrate/20160822153115_create_issue_comments.rb | 1 - db/structure.sql | 4 ++-- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/db/migrate/20160822153055_create_issues_and_reports.rb b/db/migrate/20160822153055_create_issues_and_reports.rb index 20d4fb275..a25523cb9 100644 --- a/db/migrate/20160822153055_create_issues_and_reports.rb +++ b/db/migrate/20160822153055_create_issues_and_reports.rb @@ -10,10 +10,7 @@ class CreateIssuesAndReports < ActiveRecord::Migration t.string :issue_type t.datetime :resolved_at t.integer :resolved_by - t.datetime :created_at - t.datetime :updated_at t.integer :updated_by - t.timestamps :null => false end @@ -26,9 +23,6 @@ class CreateIssuesAndReports < ActiveRecord::Migration t.integer :issue_id t.integer :reporter_user_id t.text :details, :null => false - t.datetime :created_at - t.datetime :updated_at - t.timestamps :null => false end diff --git a/db/migrate/20160822153115_create_issue_comments.rb b/db/migrate/20160822153115_create_issue_comments.rb index 57e35f48b..e3c379bc1 100644 --- a/db/migrate/20160822153115_create_issue_comments.rb +++ b/db/migrate/20160822153115_create_issue_comments.rb @@ -4,7 +4,6 @@ class CreateIssueComments < ActiveRecord::Migration t.integer :issue_id t.integer :commenter_user_id t.text :body - t.datetime :created_at t.boolean :reassign t.timestamps :null => false end diff --git a/db/structure.sql b/db/structure.sql index be0603e6e..3d8900ccf 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -694,8 +694,8 @@ CREATE TABLE issue_comments ( issue_id integer, commenter_user_id integer, body text, - created_at timestamp without time zone NOT NULL, reassign boolean, + created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL ); @@ -732,9 +732,9 @@ CREATE TABLE issues ( issue_type character varying, resolved_at timestamp without time zone, resolved_by integer, + updated_by integer, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL, - updated_by integer, report_count integer DEFAULT 0 ); -- 2.43.2