{"id":280945,"date":"2016-11-14T20:25:04","date_gmt":"2016-11-14T17:25:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=280945"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=280945","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 PHPixie Migrate"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7cd\/47c\/66c\/7cd47c66c5df9f4b83f7886240a1cba2.png\" alt=\"image\" align=\"right\"\/> <br \/>  \u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u043f\u0435\u043a\u0442\u0440 \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0448\u0430\u0435\u043c\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PHPixie \u0438 \u0435\u0451 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u044f \u0440\u0430\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u043c PHPixie Migrate \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0442 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0451 \u0431\u0435\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0410\u043f\u0433\u0440\u0435\u0439\u0434 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 PHPixie \u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043f\u0433\u0440\u0435\u0439\u0434 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  <b>1.<\/b> \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0411\u0414 (database.php)<\/p>\n<p>  PHPixie \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0433\u0434\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u0440\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"php\">return array(     'default' =&gt; array(         'connection' =&gt; 'mysql:dbname=phpixie',         'user'     =&gt; 'phpixie',         'password' =&gt; 'phpixie',         'driver'   =&gt; 'pdo'     ) ); <\/code><\/pre>\n<p>  \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <\/p>\n<pre><code class=\"php\">return array(     'default' =&gt; array(         'database' =&gt; 'phpixie',         'user'     =&gt; 'phpixie',         'password' =&gt; 'phpixie',         'adapter'  =&gt; 'mysql', \/\/ one of: mysql, pgsql, sqlite         'driver'   =&gt; 'pdo'     ) ); <\/code><\/pre>\n<p>  PHPixie \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0440\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b Migrate \u0432\u0430\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433 \u0431\u044b\u043b \u0432 \u043d\u043e\u0432\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>  <b>2.<\/b> \u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <i>\/assets\/migrate<\/i> \u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0444\u0430\u0439\u043b <i>\/assets\/config\/migrate.php<\/i> \u0441\u043e <a href=\"https:\/\/github.com\/PHPixie\/Project\">\u0441\u043a\u0435\u043b\u0435\u0442\u0430<\/a> \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435.  <\/div>\n<\/div>\n<p>  <b>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/b><\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 <i>\/assets\/config\/migrate.php<\/i>:<\/p>\n<pre><code class=\"php\">&lt;?php  return array(     \/\/ \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439     'migrations' =&gt; array(         'default' =&gt; array(                          \/\/ \u0438\u043c\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 database.php             'connection' =&gt; 'default',                          \/\/ \u043f\u0443\u0442\u044c \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0430\u043f\u043a\u0438 \/assets\/migrate\/             'path'       =&gt; 'migrations',              \/\/ \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e:                          \/\/ \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438             'migrationTable' =&gt; '__migrate',              \/\/ \u0438\u043c\u044f \u043f\u043e\u043b\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439             'lastMigrationField' =&gt; 'lastMigration'         )     ),      \/\/ \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0437\u0436\u0435)     'seeds' =&gt; array(         'default' =&gt; array(                          \/\/ \u0438\u043c\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 database.php             'connection' =&gt; 'default',                          \/\/ \u043f\u0443\u0442\u044c \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u0438\u0434\u044b, \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0430\u043f\u043a\u0438 \/assets\/migrate\/             'path' =&gt; 'seeds'         )     ) ); <\/code><\/pre>\n<p>  \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0435, \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0434\u0432\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0430\u0437, \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0438\u0434\u044b \u0434\u043b\u044f \u0442\u043e\u0439 \u0436\u0435 \u0411\u0414.<\/p>\n<p>  <b>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b<\/b><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0431\u0430\u0437\u0443 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u044f\u043c\u043e \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <i>framework:database<\/i>:<\/p>\n<p>  <code>framework:database ACTION [ CONFIG ]<br \/>  Create or drop a database<\/p>\n<p>  Arguments:<br \/>  ACTION Either 'create' or 'drop'<br \/>  CONFIG Migration configuration name, defaults to 'default'<br \/>  <\/code><\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c <i>console framework:database create<\/i> \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0431\u0430\u0437\u0430, \u0438 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0435\u0435, \u0430 <i>console framework:database drop<\/i> \u0443\u0434\u0430\u043b\u0438\u0442 \u0435\u0435.<\/p>\n<p>  <b>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/b><\/p>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043e \u0441\u0430\u043c\u043e\u043c \u0433\u043b\u0430\u0432\u043d\u043e\u043c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b.<\/p>\n<p>  \u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0431\u0430\u0437\u044b \u0432 \u043a\u043e\u0434\u0435 \u0447\u0442\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043c\u043f\u0430\u043c\u0438 \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0431\u0430\u0437\u0443 \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435. \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0441\u0442: \u0432 \u0431\u0430\u0437\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u0432\u0441\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u00ab\u0431\u043e\u043b\u044c\u0448\u0435\u00bb \u0435\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 <a href=\"http:\/\/php.net\/manual\/de\/function.natsort.php\">natsort()<\/a>, \u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u044b 1.sql, 2.sql\u2026 22.sql, a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432 \u0431\u0430\u0437\u0435 13.sql \u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u043e\u0442 14 \u0434\u043e 22, \u0438 \u0437\u0430\u0442\u0435\u043c \u0432 \u0431\u0430\u0437\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f 22 \u043a\u0430\u043a \u0438\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439. \u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .sql \u0438\u043b\u0438 .php.<\/p>\n<p>  <b>SQL \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/b><\/p>\n<p>  \u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e SQL \u0444\u0430\u0439\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0435\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u043e\u043c &quot;&#8212; statement&quot;, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"sql\">CREATE TABLE fairies(     id int NOT NULL,     name VARCHAR(255) );  -- statement  CREATE TABLE flowers(     id int NOT NULL,     name VARCHAR(255) ); <\/code><\/pre>\n<p>  <b>PHP \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/b><\/p>\n<p>  \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e PHP \u0444\u0430\u0439\u043b \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0434\u0430\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c PHPixie Database:<\/p>\n<pre><code class=\"php\">$this-&gt;execute(&quot;CREATE TABLE fairies(     id int NOT NULL,     name VARCHAR(255) )&quot;);  $this-&gt;message(&quot;\u041a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c&quot;);  \/\/ \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b $this-&gt;connection()-&gt;updateQuery()     -&gt;table('users')     -&gt;set(['role' =&gt; 'user'])     -&gt;execute(); <\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438 \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0446\u0438\u0444\u0440\u044b. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043e\u043a <i>natsort<\/i> \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u043d\u0430\u043a\u0430 <i>_<\/i>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 33_fairies_table.sql<\/p>\n<p>  \u0422\u0443\u0442 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 2 \u0432\u043e\u043f\u0440\u043e\u0441\u0430:<\/p>\n<p>  <i>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u0442 down \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0442\u0430:<\/i><br \/>  \u0415\u0441\u043b\u0438 \u0434\u0443\u043c\u0430\u0442\u044c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0439 \u0411\u0414, \u0442\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043e\u0442\u043a\u0430\u0442\u0430 \u043d\u0435\u0442 \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0433\u043e. \u041e\u0442\u043a\u0430\u0442 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432\u043f\u0435\u0440\u0435\u0434, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u043e \u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u043a\u0430\u0442 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0432\u044b \u0432 \u043e\u0434\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0442\u043e \u043e\u0442\u043a\u0430\u0442 \u043c\u043e\u0433 \u0431\u044b \u0435\u0435 \u0432\u043e\u0441\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e \u0443\u0436 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  <i>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f \u0441\u044b\u0440\u044b\u043c\u0438 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0430 \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0442\u0438\u043f\u0430 createTable() ?<\/i><br \/>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043e\u043d\u0438 \u0443\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u0430\u0437, \u0438 \u043c\u043d\u043e\u0433\u043e \u0432\u0435\u0449\u0435\u0439 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0433\u0434\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0438 \u043d\u0430\u0447\u043d\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0447\u0443\u0442\u044c \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443, \u0438 \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d \u0431\u0430\u0437\u0430 \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u0441\u044f \u043e\u0442 \u043d\u043e\u0432\u043e\u0439 \u0433\u0434\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0442\u0435 \u0436\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0441\u043f\u0443\u0441\u0442\u044f. \u041f\u043b\u044e\u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0436\u0435 \u0438 \u0442\u0430\u043a \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f SQL \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0411\u0414 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0445\u0435\u043b\u043f\u0435\u0440 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0438\u0448\u043d\u0435. <\/p>\n<p>  <b>\u0421\u0438\u0434\u044b<\/b><\/p>\n<p>  \u0421\u0438\u0434\u044b \u2014 \u044d\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0431\u0430\u0437\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u044d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438, \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u0442\u0434, \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0418\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b .php \u0438 .json. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"php\">\/\/ \/assets\/migrate\/seeds\/fairies.php  &lt;?php  return array(     array(         'id'   =&gt; 1,         'name' =&gt; 'Pixie'     ),     array(         'id'   =&gt; 2,         'name' =&gt; 'Trixie'     ), ); <\/code><\/pre>\n<pre><code>\/\/ \/assets\/migrate\/seeds\/flowers.json  [     {         &quot;id&quot;: 1,         &quot;name&quot;: &quot;daisy&quot;     },     {         &quot;id&quot;: 2,         &quot;name&quot;: &quot;Rose&quot;     }, ] <\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 .php \u043a\u0440\u043e\u043c\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0443\u043a\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0411\u0414:<\/p>\n<pre><code class=\"php\">\/\/ \/assets\/migrate\/seeds\/fairies.php  &lt;?php $this-&gt;connection()-&gt;insertQuery()     -&gt;data([         'id'   =&gt; 1,         'name' =&gt; 'Pixie'      ])      -&gt;execute(); <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0441\u0438\u0434\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <i>framework:seed<\/i>:<\/p>\n<p>  <code>framework:seed [ --truncate ] [ CONFIG ]<br \/>  Seed the database with data<\/p>\n<p>  Options:<br \/>  truncate Truncate the tables before inserting the data.<\/p>\n<p>  Arguments:<br \/>  CONFIG Seed configuration name, defaults to 'default'<br \/>  <\/code><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0432\u044b\u0432\u043e\u0434\u0443 \u043e\u0448\u0438\u0431\u043a\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u0435\u0440\u0435\u0434 \u0432\u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>&#8212;truncate<\/i>.<\/p>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u0411\u0414 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0441\u0438\u0434\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0435\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430<\/b><\/p>\n<p>  \u041a\u0430\u043a \u0438 \u0432\u0441\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b PHPixie Migrate \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"php\">$slice = new \\PHPixie\\Slice(); $database = new \\PHPixie\\Database($slice-&gt;arrayData(array(     'default' =&gt; array(         'database' =&gt; 'phpixie',         'user'     =&gt; 'phpixie',         'password' =&gt; 'phpixie',         'adapter'  =&gt; 'mysql', \/\/ one of: mysql, pgsql, sqlite         'driver'   =&gt; 'pdo'     ) )));  $filesystem = new \\PHPixie\\Filesystem(); $migrate = new \\PHPixie\\Migrate(     $filesystem-&gt;root(__DIR__.'\/assets\/migrate'),     $database,     $slice-&gt;arrayData(array(     'migrations' =&gt; array(         'default' =&gt; array(             'connection' =&gt; 'default',             'path'       =&gt; 'migrations',         )     ),     'seeds' =&gt; array(         'default' =&gt; array(             'connection' =&gt; 'default',             'path' =&gt; 'seeds'         )     ) )));   $cli = new \\PHPixie\\CLI(); $console = new \\PHPixie\\Console($slice, $cli, $migrate-&gt;consoleCommands()); $console-&gt;runCommand(); <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0431\u0443\u0434\u0443\u0442 <i>run<\/i>, <i>seed<\/i>, <i>database<\/i> \u0431\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 <i>framework<\/i>.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0438\u0447 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u043d\u043e \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0437\u0430\u0436\u0434\u0430\u043b\u0438\u0441\u044c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f 3-\u0439 PHPixie.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/315254\/\"> https:\/\/habrahabr.ru\/post\/315254\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7cd\/47c\/66c\/7cd47c66c5df9f4b83f7886240a1cba2.png\" alt=\"image\" align=\"right\"\/> <br \/>  \u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c \u043d\u0430\u0437\u0430\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u043f\u0435\u043a\u0442\u0440 \u0437\u0430\u0434\u0430\u0447 \u0440\u0435\u0448\u0430\u0435\u043c\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PHPixie \u0438 \u0435\u0451 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u044f \u0440\u0430\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u043c PHPixie Migrate \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0442 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0451 \u0431\u0435\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/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-280945","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280945","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=280945"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280945\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}