From ea502d5b7baf55c39f3ec88ad571b0c5803e9243 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Thu, 29 Mar 2018 10:05:37 -0400 Subject: [PATCH] Create 026_create_line_items.rb --- db/migrate/026_create_line_items.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 db/migrate/026_create_line_items.rb diff --git a/db/migrate/026_create_line_items.rb b/db/migrate/026_create_line_items.rb new file mode 100644 index 0000000..51b40e1 --- /dev/null +++ b/db/migrate/026_create_line_items.rb @@ -0,0 +1,25 @@ +#The License +# +#Copyright (c) 2018 Rick Barrette - All Rights Reserved +# +#Unauthorized copying of this software and associated documentation files (the "Software"), via any medium is strictly prohibited. +# +#Proprietary and confidential +# +#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class CreateLineItems < ActiveRecord::Migration + def change + create_table :line_items do |t| + t.integer :item_id + t.float :amount + t.string :description + t.float :unit_price + t.float :quantity + end + + add_reference :line_items, :issues, index: true + end +end