From 8e15dbd73035c2a2198a2828a20ddcebe0739823 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 3 Jul 2018 13:58:57 -0400 Subject: Implemented streams Currently there are no links to the pages for editing stream updates, and the admin panel for managing streams could probably have a better look & feel, but here's some basic working functionality. refs #8 --- db/migrate/20180702220722_create_streams.rb | 11 +++++++++++ db/migrate/20180702221133_create_updates.rb | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 db/migrate/20180702220722_create_streams.rb create mode 100644 db/migrate/20180702221133_create_updates.rb (limited to 'db/migrate') diff --git a/db/migrate/20180702220722_create_streams.rb b/db/migrate/20180702220722_create_streams.rb new file mode 100644 index 0000000..bb8255e --- /dev/null +++ b/db/migrate/20180702220722_create_streams.rb @@ -0,0 +1,11 @@ +class CreateStreams < ActiveRecord::Migration[5.1] + def change + create_table :streams do |t| + t.string :title + t.text :body + t.string :slug + + t.timestamps + end + end +end diff --git a/db/migrate/20180702221133_create_updates.rb b/db/migrate/20180702221133_create_updates.rb new file mode 100644 index 0000000..05cc35a --- /dev/null +++ b/db/migrate/20180702221133_create_updates.rb @@ -0,0 +1,10 @@ +class CreateUpdates < ActiveRecord::Migration[5.1] + def change + create_table :updates do |t| + t.references :stream, foreign_key: true + t.text :body + + t.timestamps + end + end +end -- cgit 1.4.1