Browse files

Make options a little more flexible

Add snippets for changing columns and adding/removing indexes
  • Loading branch information...
1 parent f14c375 commit ecafe6e4976252239509af7afe5bf4ef9c39e51b @raldred raldred committed Apr 10, 2013
View
2 Migration-Add-Column.sublime-snippet
@@ -1,5 +1,5 @@
<snippet>
- <content><![CDATA[add_column :${1:table}, :${2:column}, :${3:string}, ${4:limit}: ${5:255}]]></content>
+ <content><![CDATA[add_column :${1:table}, :${2:column}, :${3:string}${4:, ${5:limit}: ${6:255}}]]></content>
<tabTrigger>mcol</tabTrigger>
<scope>meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table</scope>
<description>Add Column</description>
View
6 Migration-Add-Index.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[add_index :${1:table}, :${2:columns}${4:, ${5:name}: "${6:custom_index_name}"}]]></content>
+ <tabTrigger>mind</tabTrigger>
+ <scope>meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table</scope>
+ <description>Add Index</description>
+</snippet>
View
6 Migration-Change-Column.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[change_column :${1:table}, :${2:column}, :${3:string}${4:, ${5:limit}: ${6:255}}]]></content>
+ <tabTrigger>mcol</tabTrigger>
+ <scope>meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table</scope>
+ <description>Change Column</description>
+</snippet>
View
6 Migration-Remove-Index.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[remove_index :${1:table}, name: :${2:index_name}]]></content>
+ <tabTrigger>mind</tabTrigger>
+ <scope>meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table</scope>
+ <description>Remove Index</description>
+</snippet>
View
2 Migration-Rename-Column.sublime-snippet
@@ -1,6 +1,6 @@
<snippet>
<content><![CDATA[rename_column :${1:table}, :${2:old_column_name}, :${3:new_column_name}]]></content>
- <tabTrigger>recol</tabTrigger>
+ <tabTrigger>mcol</tabTrigger>
<scope>meta.rails.migration - meta.rails.migration.create_table - meta.rails.migration.change_table</scope>
<description>Rename Column</description>
</snippet>

0 comments on commit ecafe6e

Please sign in to comment.