Last active
October 2, 2018 15:47
-
-
Save coreyjs/420577750fdcbbf66c967e60026f4d21 to your computer and use it in GitHub Desktop.
ch-01-app.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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