forked from gendosu/column_comments
-
Notifications
You must be signed in to change notification settings - Fork 0
Duane Johnson's rails plugin to allow SQL comments to be added in migrations
License
okyada/column_comments
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ColumnComments v. 1.3 ===================== Changes to version 1.3: - Fixed that the latest edge rails (R5601) broke the MysqlColumn initialize method. Use "rake annotate_models" to add comments (using the database definition) to the head of each AR model in your application. Note that if you want to combine these auto-generated comments with your own hand-made ones, you should put your comments *before* the "Schema as of ..." line or your comments will be destroyed. In migration files, use the :comment option when creating a column to add a comment to the column, or use the #column_comment method to set the comment explicitly (e.g. if the column already exists and you just want to add a comment to it.) Example migration: def self.up create_table "users" do |t| t.column "first_name", :string, :comment => "The member's given name." end column_comment "tags", "id", "The unique ID of any tag in the system." end You can also assign multiple comments at the same time: column_comments({ :users => {:first_name => "User's given name", :last_name => "Family name"}, :tags => {:id => "Tag IDentifier"}}) Author: Duane Johnson, duane.johnson@gmail.com Website: http://blog.inquirylabs.com Note: A substantial portion of this plugin is based on Dave Thomas's AnnotateModels plugin.
About
Duane Johnson's rails plugin to allow SQL comments to be added in migrations
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published