Ensure reports have an issue id and a user id
This commit is contained in:
parent
5e7abf67fb
commit
3e5a4a14df
3 changed files with 6 additions and 4 deletions
|
@ -21,8 +21,8 @@ class CreateIssuesAndReports < ActiveRecord::Migration[5.0]
|
|||
add_index :issues, :updated_by
|
||||
|
||||
create_table :reports do |t|
|
||||
t.integer :issue_id
|
||||
t.integer :user_id
|
||||
t.integer :issue_id, :null => false
|
||||
t.integer :user_id, :null => false
|
||||
t.text :details, :null => false
|
||||
t.string :category, :null => false
|
||||
t.timestamps :null => false
|
||||
|
|
|
@ -1064,8 +1064,8 @@ CREATE TABLE relations (
|
|||
|
||||
CREATE TABLE reports (
|
||||
id integer NOT NULL,
|
||||
issue_id integer,
|
||||
user_id integer,
|
||||
issue_id integer NOT NULL,
|
||||
user_id integer NOT NULL,
|
||||
details text NOT NULL,
|
||||
category character varying NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue