{"id":172255,"date":"2013-03-11T13:07:03","date_gmt":"2013-03-11T09:07:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=172255"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=172255","title":{"rendered":"<span class=\"post_title\">Enginery \u2014 \u00ab\u0412\u044b\u0441\u043e\u043a\u043e\u0442\u043e\u0447\u043d\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u00bb \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Espresso Framework<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<a href=\"https:\/\/github.com\/espresso\/enginery\"><img decoding=\"async\" src=\"https:\/\/raw.github.com\/espresso\/enginery\/master\/logo.png\" align=\"right\"\/><\/a><\/p>\n<p>  Espresso \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043b\u0451\u0433\u043a\u0438\u0439 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Ruby \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a.<br \/>  \u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u043c\u043e\u0436\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/post\/139872\/\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Espresso \u043b\u0435\u0433\u043a\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e,<br \/>  \u0435\u0441\u043b\u0438 \u044d\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b.<\/p>\n<p>  \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043e\u043a\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0441\u043f\u0435\u043a\u043e\u0432 \u0438\u0442\u0434.<br \/>  \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0441\u0442\u0438, \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c.<\/p>\n<p>  \u0418\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d <b><a href=\"https:\/\/github.com\/espresso\/enginery\">Enginery<\/a><\/b><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  <a href=\"#install\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/a> | <a href=\"#projects\">\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u041f\u0440\u043e\u0435\u043a\u0442\u0430<\/a> | <a href=\"#controllers\">\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u044b<\/a> | <a href=\"#actions\">Actions<\/a> |<a href=\"#specs\">\u0421\u043f\u0435\u043a\u0438<\/a> | <a href=\"#models\">\u041c\u043e\u0434\u0435\u043b\u0438<\/a> | <a href=\"#migrations\">\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/a><\/p>\n<p>  <\/p>\n<h1>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h1>\n<p>  <b><code> $ gem in enginery <\/code><\/b><\/p>\n<p>  + <b><code>$ rbenv rehash<\/code><\/b> \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <b><code>rbenv<\/code><\/b><\/p>\n<h1>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u041f\u0440\u043e\u0435\u043a\u0442\u0430<\/h1>\n<p>  <b><code> $ enginery generate:project ProjectName <\/code><\/b><\/p>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e \u043d\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043e:<\/p>\n<p>  <b><code> $ enginery g:p ProjectName <\/code><\/b><\/p>\n<p>  \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043e:<\/p>\n<p>  <b><code> $ enginery g ProjectName <\/code><\/b><\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u00abg\u00bb \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, Enginery \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u0448\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0443\u0442 \u043f\u0430\u043f\u043a\u0443 \u00abProjectName\/\u00bb \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u0430\u043f\u043a\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043e:<\/p>\n<p>  <b><code> $ enginery g <\/code><\/b><\/p>\n<p>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u2014 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043f\u0430\u043f\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <b><code>orm:<\/code><\/b> \u043e\u043f\u0446\u0438\u044e:<\/p>\n<p>  <b><code> $ enginery g orm:SomeORM <\/code><\/b><br \/>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 ORM: <b><code>ActiveRecord<\/code><\/b>, <b><code>DataMapper<\/code><\/b>, <b><code>Sequel<\/code><\/b>.<\/p>\n<p>  <b><\/p>\n<pre> $ enginery g orm:ActiveRecord # or $ enginery g orm:DataMapper # or $ enginery g orm:Sequel <\/pre>\n<p><\/b><\/p>\n<p>  \u0418\u043c\u044f ORM \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c:<\/p>\n<p>  <b><\/p>\n<pre> # ActiveRecord $ enginery g orm:ar  # DataMapper $ enginery g orm:dm  # Sequel $ enginery g orm:sq <\/pre>\n<p><\/b><\/p>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, <b><code>orm:<\/code><\/b> \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043e <b><code>o:<\/code><\/b><\/p>\n<p>  <b><code> $ enginery g o:ar <\/code><\/b><\/p>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b><code>ERB<\/code><\/b> engine.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0446\u0438\u044e <b><code>engine:<\/code><\/b><\/p>\n<p>  <b><\/p>\n<pre> $ enginery g engine:Haml # or $ enginery g engine:Slim # etc. <\/pre>\n<p><\/b><\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e<\/b> \u2014 \u0438\u043c\u044f \u0434\u0432\u0438\u0436\u043a\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0441 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, <b><code>engine:<\/code><\/b> \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043e <b><code>e:<\/code><\/b><\/p>\n<p>  <b><code> $ enginery g e:Slim <\/code><\/b><\/p>\n<p>  <b>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<br \/>  <\/b>  <\/p>\n<pre> - base\/   | - models\/   | - views\/   | - controllers\/   | - helpers\/   | - specs\/   | - migrations\/   | - boot.rb   | - config.rb   ` - database.rb  - config\/   | - config.yml   ` - database.yml  - public\/   | - assets\/       | - app.css       ` - app.js  - tmp\/  - var\/   | - db\/   | - log\/   ` - pid\/  - Rakefile - Gemfile - app.rb - config.ru <\/pre>\n<p>  <sub><a href=\"#top\">\u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a>\u2191<\/sub><\/p>\n<h1>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u044b<\/h1>\n<p>  \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>g:controller<\/code><\/b> \u0438\u043b\u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 <b><code>g:c<\/code><\/b><\/p>\n<p>  <b><code> $ enginery g:c Foo <\/code><\/b><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <b><code>Haml<\/code><\/b>, \u0432\u0441\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b><code>Haml<\/code><\/b><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430:<\/p>\n<p>  <b><code> $ enginery g:c Bar e:Slim <\/code><\/b><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c <b><code>Foo<\/code><\/b> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b><code>Haml<\/code><\/b> engine \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a <b><code>Bar<\/code><\/b> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b><code>Slim<\/code><\/b>.<\/p>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c URL \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u0437 \u0438\u043c\u0435\u043d\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430:<\/p>\n<p>  Foo \u2014 \/foo<\/p>\n<p>  FooBar \u2014 \/foo_bar<\/p>\n<p>  Foo::Bar \u2014 \/foo\/bar<\/p>\n<p>  \u0438\u0442\u0434.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u044e <b><code>route:<\/code><\/b><\/p>\n<p>  <b><code> $ enginery g:c Foo route:\/ <\/code><\/b><br \/>  \u0442\u0435\u043f\u0435\u0440\u044c <b><code>Foo<\/code><\/b> \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c &quot;\/&quot; URL.<\/p>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, <b><code>route:<\/code><\/b> \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043e <b><code>r:<\/code><\/b> <\/p>\n<p>  <b><code> $ enginery g:c Foo r:\/some-url <\/code><\/b><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0438\u043c\u0435\u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c:<\/p>\n<p>  <b><code> $ enginery g:c Foo Bar Baz <\/code><\/b><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0438\u043c\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c:<\/p>\n<p>  <b><\/p>\n<pre> $ enginery g:c Forum::Posts  $ cat base\/controllers\/forum\/posts_controller.rb module Forum   class Posts &lt; E        end end <\/pre>\n<p><\/b><\/p>\n<p>  <sub><a href=\"#top\">\u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a>\u2191<\/sub><\/p>\n<h1>Actions<\/h1>\n<p>  \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f <b><code>index<\/code><\/b> action \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430.<\/p>\n<p>  \u041d\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 action-\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>g:route<\/code><\/b> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <b><code>g:r<\/code><\/b><\/p>\n<p>  <b><code> $ enginery g:r Page edit <\/code><\/b><br \/>  \u0433\u0434\u0435 <b><code>Page<\/code><\/b> \u0438\u043c\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430 \u0430 <b><code>edit<\/code><\/b> \u0438\u043c\u044f action-\u0430.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c action-\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c action \u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0438\u0445 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 action-\u0430:<\/p>\n<p>  <b><code> $ enginery g:r Page read e:Haml <\/code><\/b><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c <b><code>edit<\/code><\/b> action \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b><code>ERB<\/code><\/b> engine \u0430 <b><code>read<\/code><\/b> \u2014 Haml.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e action-\u043e\u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u0438\u043c\u0435\u043d\u0430 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c:<\/p>\n<p>  <b><code> $ enginery g:r Foo a b c <\/code><\/b><\/p>\n<p>  <sub><a href=\"#top\">\u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a>\u2191<\/sub><\/p>\n<h1>\u0421\u043f\u0435\u043a\u0438<\/h1>\n<p>  \u0421\u043f\u0435\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 action-\u043e\u0432.<\/p>\n<p>  <b><code> $ enginery g:r Page edit <\/code><\/b><br \/>  \u043a\u0440\u043e\u043c\u0435 action-\u0430 \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0444\u0430\u0439\u043b \u00abbase\/specs\/page\/edit_spec.rb\u00bb. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b.<\/p>\n<p>  Enginery \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0432\u044f\u0437\u043a\u0443 <a href=\"https:\/\/github.com\/slivu\/specular\">Specular<\/a> \/ <a href=\"https:\/\/github.com\/slivu\/sonar\">Sonar<\/a> \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442\u0435\u0440\u0430\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u044f\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>$ rake test<\/code><\/b> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <b><code>$ rake<\/code><\/b><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <b><code>Foo<\/code><\/b> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>$ rake test:Foo<\/code><\/b><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <b><code>bar<\/code><\/b> action <b><code>Foo<\/code><\/b> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>$ rake test:Foo#bar<\/code><\/b><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0438\u043c\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u043d\u0435 \u0432\u0437\u0438\u0440\u0430\u044f \u043d\u0430 &quot;::&quot;<\/p>\n<p>  <b><code> $ rake test:Forum::Posts <\/code><\/b><\/p>\n<p>  <sub><a href=\"#top\">\u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a>\u2191<\/sub><\/p>\n<h1>\u041c\u043e\u0434\u0435\u043b\u0438<\/h1>\n<p>  \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>g:model<\/code><\/b> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <b><code>g:m<\/code><\/b><\/p>\n<p>  <b><code> $ enginery g:m Foo <\/code><\/b><\/p>\n<p>  \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 ActiveRecord:<\/p>\n<p>  <b><\/p>\n<pre> $ enginery g:m Foo  $ cat base\/models\/foo.rb class Foo &lt; ActiveRecord::Base  end <\/pre>\n<p><\/b><\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 DataMapper:<\/p>\n<p>  <b><\/p>\n<pre> $ enginery g:m Foo  $ cat base\/models\/foo.rb class Foo   include DataMapper::Resource    property :id, Serial end <\/pre>\n<p><\/b><\/p>\n<p>  \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 Sequel:<\/p>\n<p>  <b><\/p>\n<pre> $ enginery g:m Foo  $ cat base\/models\/foo.rb class Foo &lt; Sequel::Model    end <\/pre>\n<p><\/b><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0438\u043c\u0435\u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c:<\/p>\n<p>  <b><code> $ enginery g:m Foo Bar Baz <\/code><\/b><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0438\u043c\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c:<\/p>\n<p>  <b><code> $ enginery g:m Forum::Post <\/code><\/b><br \/>  \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u00abbase\/models\/forum\/post.rb\u00bb \u0444\u0430\u0439\u043b.<\/p>\n<p>  <sub><a href=\"#top\">\u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a>\u2191<\/sub><\/p>\n<h1>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h1>\n<p>  \u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\/\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0421 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\/\u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0446\u0435\u043b\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b.<\/p>\n<p>  \u041d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438\u0445 \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043e\u043d\u0438 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u044e\u0442 \u043a\u0430\u043a \u00ab\u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f\u00bb \u043d\u0430\u0437\u0430\u0434.<\/p>\n<p>  \u041f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c, \u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <b><code> $ enginery g:m Page <\/code><\/b><br \/>  \u043a\u0440\u043e\u043c\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u044d\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u00abbase\/migrations\/[n].[timestamp].initializing-Page-model.rb\u00bb \u0444\u0430\u0439\u043b,<br \/>  \u0433\u0434\u0435 [n] \u044d\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0430 [timestamp] \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c <b><code>Page<\/code><\/b> \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u00abup\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<p>  <b><code> $ enginery migrate:up 1 <\/code><\/b><br \/>  \u0433\u0434\u0435 1 \u044d\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f <b><code>Page<\/code><\/b> \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u00ab\u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u00bb \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u00abdown\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<p>  <b><code> $ enginery migrate:down 1 <\/code><\/b><\/p>\n<p>  \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0443\u0434\u043e\u0431\u043d\u0430 \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0451 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439, \u0437\u0430\u0434\u0430\u0451\u043c \u0438\u043c\u0435\u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438:<\/p>\n<p>  <b><code> $ enginery g:m Page column:name column:about:text <\/code><\/b><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c\u0438.<\/p>\n<p>  \u0423\u0434\u043e\u0431\u043d\u043e \u043d\u043e \u043d\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u0432\u043e\u0438 \u0433\u0440\u0430\u043d\u0434\u0438\u043e\u0437\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u0443\u044e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u043e\u0432\u044b\u0435 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446:<\/p>\n<p>  <b><\/p>\n<pre> $ enginery migration add-colors model:Page column:colors  --- Page model - generating &quot;add-colors&quot; migration ---    Serial Number: 2 <\/pre>\n<p><\/b><br \/>  \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c 2.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0435\u0451 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u00abup\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<p>  <b><code> $ enginery migrate:up 2 <\/code><\/b><br \/>  \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u043e\u0432\u044b\u0439 VARCHAR \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c colors.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u0435\u043d\u044c \u0433\u0440\u0430\u043d\u0434\u0438\u043e\u0437\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0434\u0435\u0435\u0439, \u00ab\u043e\u0442\u043a\u0430\u0442\u0438\u0442\u0441\u044f\u00bb \u043d\u0430\u0437\u0430\u0434 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u00abdown\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<p>  <b><code> $ enginery migrate:down 2 <\/code><\/b><br \/>  \u0438 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c colors \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0451\u043d.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0438\u043f \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>update_column:column_name:new_type<\/code><\/b><\/p>\n<p>  <b><\/p>\n<pre> $ enginery m change-colors-to-text model:Page update_column:colors:text  --- Page model - generating &quot;change-colors-to-text&quot; migration ---    Serial Number: 3 <\/pre>\n<p><\/b><br \/>  \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c 3.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u00abup\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0442\u0438\u043f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u00abcolors\u00bb \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0441 String \u043d\u0430 Text.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u00abdown\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0442\u0438\u043f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u00abcolors\u00bb \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441 Text \u043d\u0430 String.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b><code>rename_column:column_name:new_name<\/code><\/b><\/p>\n<p>  <b><\/p>\n<pre> $ enginery m rename_colors_to_color model:Page rename_column:colors:color  --- Page model - generating &quot;rename_colors_to_color&quot; migration ---    Serial Number: 4 <\/pre>\n<p><\/b><br \/>  \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c 4.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u00abup\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u00abcolors\u00bb \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d \u0432 \u00abcolor\u00bb.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u00abdown\u00bb \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u00abcolor\u00bb \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u00abcolors\u00bb.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d(N-M) \u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a(N M).<\/p>\n<p>  <b><code> $ enginery migrate:up 2-5 <\/code><\/b><br \/>  \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 2 \u043f\u043e 5 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  <b><code> $ enginery migrate:up 2 4 6 <\/code><\/b><br \/>  \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 2, 4 \u0438 6.<\/p>\n<p>  <b>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c<\/b> \u0447\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440: \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d 2-5 \u043f\u0440\u0438 \u00abup\u00bb \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438: 2 &gt; 3 &gt; 4 &gt; 5<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440: \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d 2-5 \u043f\u0440\u0438 \u00abdown\u00bb \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438: 5 &gt; 4 &gt; 3 &gt; 2<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440: \u0441\u043f\u0438\u0441\u043e\u043a 2 6 4 \u043f\u0440\u0438 \u00abup\u00bb \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438: 2 &gt; 4 &gt; 6<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440: \u0441\u043f\u0438\u0441\u043e\u043a 2 6 4 \u043f\u0440\u0438 \u00abdown\u00bb \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438: 6 &gt; 4 &gt; 2    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/172255\/\"> http:\/\/habrahabr.ru\/post\/172255\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<a href=\"https:\/\/github.com\/espresso\/enginery\"><img decoding=\"async\" src=\"https:\/\/raw.github.com\/espresso\/enginery\/master\/logo.png\" align=\"right\"\/><\/a><\/p>\n<p>  Espresso \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043b\u0451\u0433\u043a\u0438\u0439 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Ruby \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a.<br \/>  \u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u043c\u043e\u0436\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/post\/139872\/\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Espresso \u043b\u0435\u0433\u043a\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e,<br \/>  \u0435\u0441\u043b\u0438 \u044d\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u0433\u043a\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b.<\/p>\n<p>  \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043e\u043a\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432, \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0441\u043f\u0435\u043a\u043e\u0432 \u0438\u0442\u0434.<br \/>  \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442 \u0440\u0430\u0441\u0442\u0438, \u0431\u0435\u0437 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c.<\/p>\n<p>  \u0418\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d <b><a href=\"https:\/\/github.com\/espresso\/enginery\">Enginery<\/a><\/b><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-172255","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=172255"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/172255\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=172255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=172255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=172255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}