Skip to content

Instantly share code, notes, and snippets.

@coreyjs
Last active October 2, 2018 15:47
Show Gist options
  • Save coreyjs/420577750fdcbbf66c967e60026f4d21 to your computer and use it in GitHub Desktop.
Save coreyjs/420577750fdcbbf66c967e60026f4d21 to your computer and use it in GitHub Desktop.
ch-01-app.rb
class CreateApps < ActiveRecord::Migration[5.2]
def change
create_table :apps do |t|
# Name of our app, used for visual readability.
t.string :name, unique: true
# Internal identifier of our app, for communication from the open api endpoint
t.string :token, unique: true
# Switch to determine if this app is currently accepting data.
# Allows us to remotly turn off this app from taking data requests.
t.boolean :monitor, default: true
t.timestamps
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment