Created
November 11, 2020 10:20
-
-
Save JoseMPena/a3b389d363e18e93f5ec48e241c5e3fe to your computer and use it in GitHub Desktop.
Using rails console to manipulate schema
This file contains hidden or 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
| 2.3.1 :001 > class SchemaMigration < ActiveRecord::Base; self.primary_key = :version; end | |
| => :version | |
| class SchemaMigration < ActiveRecord::Base; self.primary_key = :version; end | |
| 2.3.1 :002 > SchemaMigration.first | |
| SchemaMigration Load (2.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC LIMIT 1 | |
| => #<SchemaMigration version: "20160727113335"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment