{"id":60950,"date":"2021-08-01T08:08:09","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"https:\/\/www.sejuku.net\/blog\/?p=60950"},"modified":"2024-05-06T11:49:09","modified_gmt":"2024-05-06T02:49:09","slug":"%e3%80%90rails%e5%85%a5%e9%96%80%e3%80%91generate-migration%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%ae%e5%88%86%e3%81%8b%e3%82%8a%e3%82%84%e3%81%99%e3%81%84%e3%81%be%e3%81%a8%e3%82%81","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/60950","title":{"rendered":"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u30b7\u30b9\u30c6\u30e0\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30aa\u30aa\u30a4\u30b7\u3067\u3059\u3002<\/p>\n<p>Ruby on Rails\u306e<span style=\"color: #339966\"><strong>generate migration\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u3092\u3054\u5b58\u77e5\u3067\u3059\u304b\uff1f<\/p>\n<p>generate migration\u30b3\u30de\u30f3\u30c9\u306f\u3001<span style=\"color: #0000ff\"><strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u306e\u7d99\u7d9a\u7684\u306a\u8ffd\u52a0\u30fb\u5909\u66f4\u3059\u308b\u305f\u3081\u306e\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3(migration)\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/strong><\/span>\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f<\/p>\n<ul>\n<li><span style=\"color: #ff0000\"><strong>generate migration\u30b3\u30de\u30f3\u30c9\u3068\u306f<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>generate migration\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046<\/strong><\/span><\/li>\n<\/ul>\n<p>\u3068\u3044\u3063\u305f\u57fa\u672c\u7684\u306a\u89e3\u8aac\u304b\u3089\u3001<\/p>\n<ul>\n<li><span style=\"color: #ff0000\"><strong>migration\u30af\u30e9\u30b9\u306e\u547d\u540d\u898f\u5247<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>migration\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b2\u3064\u306e\u65b9\u6cd5<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>migration\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30fc\u30bf\u578b\u4e00\u89a7<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>migration\u30d5\u30a1\u30a4\u30eb\u306e\u30ab\u30e9\u30e0\u30aa\u30d7\u30b7\u30e7\u30f3\u4e00\u89a7<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>migration\u30d5\u30a1\u30a4\u30eb\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000\"><strong>migration\u3092\u7ba1\u7406\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/strong><\/span><\/li>\n<\/ul>\n<p>\u306a\u3069\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9\u306b\u95a2\u3057\u3066\u3082\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306agenerate migration\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u3044\u65b9\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\uff01<\/p>\n<h2>generate migration\u30b3\u30de\u30f3\u30c9\u3068\u306f<\/h2>\n<p><span style=\"color: #339966\"><strong>generate migration<\/strong><\/span>\u3068\u306f\u3001<span style=\"color: #ff0000;background-color: #ffff99\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3(migration)\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306erails\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u3067\u3059\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3068\u306f\u3001<\/p>\n<ul>\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u306e\u30ab\u30e9\u30e0\u306e\u8ffd\u52a0\u30fb\u5909\u66f4\u30fb\u524a\u9664<\/li>\n<li>index\u306e\u8ffd\u52a0\u30fb\u5909\u66f4\u30fb\u524a\u9664<\/li>\n<li>\u30ab\u30e9\u30e0\u306e\u540d\u79f0\u3084\u30c7\u30fc\u30bf\u578b\u306e\u5909\u66f4<\/li>\n<\/ul>\n<p>\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u30d5\u30a1\u30a4\u30eb\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306f\u3001Ruby on Rails\u306e\u6a5f\u80fd\u306e1\u3064\u3067\u3042\u308b<span style=\"color: #339966\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3(migration)<\/strong><\/span>\u304c\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-61242\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration5.png\" alt=\"rails_g_migration5\" width=\"1560\" height=\"758\" srcset=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration5.png 1560w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration5-150x73.png 150w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration5-300x146.png 300w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration5-640x311.png 640w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration5-810x394.png 810w, https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration5-1140x554.png 1140w\" sizes=\"(max-width: 1560px) 100vw, 1560px\" \/><\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3(migration)\u306f\u3001<span style=\"color: #0000ff\"><strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30ad\u30fc\u30de\u3078\u306e\u8ffd\u52a0\u30fb\u5909\u66f4\u30fb\u524a\u9664\u3092\u4f55\u5ea6\u3067\u3082\u7e70\u308a\u8fd4\u3057\u5b9f\u884c\u3067\u304d\u308b<\/strong><\/span>\u3053\u3068\u304c\u7279\u5fb4\u3067\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u6b21\u9805\u3067generate migration\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u898b\u307e\u3057\u3087\u3046\uff01<\/p>\n<h2>generate migration\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u307f\u3088\u3046<\/h2>\n<p>generate migration\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u3044\u65b9\u306f\u3001<\/p>\n<ul>\n<li>bin\/rails <span style=\"color: #339966\"><strong>generate migration<\/strong><\/span>\u00a0<span style=\"color: #0000ff\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<span style=\"color: #0000ff\"><strong>\u30af\u30e9\u30b9\u540d<\/strong><\/span><\/strong><\/span> \u30ab\u30e9\u30e0\u540d:\u578b &#8230;<\/li>\n<li>bin\/rails <span style=\"color: #339966\"><strong>g migration<\/strong><\/span>\u00a0<span style=\"color: #0000ff\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u540d<\/strong><\/span> \u30ab\u30e9\u30e0\u540d:\u578b &#8230;<\/li>\n<\/ul>\n<p>\u3067\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u300c\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u540d\u300d\u306f\u3001<\/p>\n<ul>\n<li><span style=\"color: #339966\"><strong>\u30ad\u30e3\u30e1\u30eb\u30b1\u30fc\u30b9<\/strong><\/span>\u3000\u2192\u00a0 &#8220;CreateSample&#8221;<\/li>\n<li><span style=\"color: #339966\"><strong>\u30b9\u30cd\u30fc\u30af\u30b1\u30fc\u30b9<\/strong><\/span> \u2192 &#8220;create_sample&#8221;<\/li>\n<\/ul>\n<p>\u306e\u3069\u3061\u3089\u306e\u547d\u540d\u65b9\u6cd5\u3067\u3082\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u300cg migration \u30b3\u30de\u30f3\u30c9\u300d\u3092\u5b9f\u884c\u3057\u3066<span style=\"color: #339966\"><strong>\u30b5\u30f3\u30d7\u30eb\u30c6\u30fc\u30d6\u30eb(samples)<\/strong><\/span>\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ bin\/rails g migration CreateSample name:string\r\n    Running via Spring preloader in process 12298\r\n          invoke  active_record\r\n          create    db\/migrate\/20180626081942_create_sample.rb\r\n<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\uff1a<\/p>\n<pre class=\"lang:ruby decode:true\">class CreateSample &lt; ActiveRecord::Migration[5.1]\r\n  def change\r\n    create_table :samples do |t|\r\n      t.string :name\r\n    end\r\n  end\r\nend\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53cd\u6620\u3057\u3066\u898b\u307e\u3057\u3087\u3046\u3002\u306a\u304a\u3001\u5229\u7528\u3059\u308bRDMS\u306fMySQL\u3068\u3057\u307e\u3059\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8(bin\/rails db:migrate)\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true\">$ bin\/rails db:migrate\r\nRunning via Spring preloader in process 12373\r\n== 20180626081942 CreateSample: migrating =====================================\r\n-- create_table(:samples)\r\n   -&gt; 0.0044s\r\n== 20180626081942 CreateSample: migrated (0.0045s) ============================\r\n<\/pre>\n<p>MySQL\u3067\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\uff1a<\/p>\n<pre class=\"lang:mysql decode:true\">$ bin\/rails dbconsole\r\n ~~ \u7701\u7565 ~~\r\nmysql&gt; desc samples;\r\n+-------+--------------+------+-----+---------+----------------+\r\n| Field | Type         | Null | Key | Default | Extra          |\r\n+-------+--------------+------+-----+---------+----------------+\r\n| id    | bigint(20)   | NO   | PRI | NULL    | auto_increment |\r\n| name  | varchar(255) | YES  |     | NULL    |                |\r\n+-------+--------------+------+-----+---------+----------------+\r\n2 rows in set (0.00 sec)\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u30b5\u30f3\u30d7\u30eb\u30c6\u30fc\u30d6\u30eb(samples)\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u6b21\u9805\u3067\u306f\u300cbin\/rails g migration <span style=\"color: #339966\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u540d<\/strong><\/span>\u300d\u306e<span style=\"color: #0000ff\"><strong>\u547d\u540d\u898f\u5247<\/strong><\/span>\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u884c\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001migration\u306e\u57fa\u790e\u306b\u3064\u3044\u3066\u306f\u3001\u3053\u3061\u3089\u3067\u89e3\u8aac\u3057\u3066\u3044\u308b\u306e\u3067\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/14229\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/07\/rails_db_migrate1-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Rails\u5165\u9580\u3011\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8a2d\u5b9a\u3059\u308brails db:migrate\u3092\u8aac\u660e\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n<p>migration\u3068\u306e\u95a2\u4fc2\u304c\u6df1\u3044<span style=\"color: #339966\"><strong>\u30e2\u30c7\u30eb(model)<\/strong><\/span>\u306e\u89e3\u8aac\u306b\u3064\u3044\u3066\u306f\u3001\u3053\u3061\u3089\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/26974\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/07\/26974-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Rails\u5165\u9580\u3011\u30e2\u30c7\u30eb(model)\u306e\u57fa\u672c\u307e\u3068\u3081<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n<h2>migration\u30d5\u30a1\u30a4\u30eb\u306e\u8a2d\u5b9a\u4e00\u89a7<\/h2>\n<p>\u3053\u3053\u3067\u306f\u3001migration\u30d5\u30a1\u30a4\u30eb\u306e\u547d\u540d\u898f\u5247\u3084\u6307\u5b9a\u3067\u304d\u308b\u30c7\u30fc\u30bf\u578b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30ab\u30e9\u30e0\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u4e00\u89a7\u3067\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h3>migration\u30af\u30e9\u30b9\u306e\u547d\u540d\u898f\u5247<\/h3>\n<p><span style=\"color: #339966\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u540d<\/strong><\/span>\u306f\u3001<span style=\"color: #0000ff\"><strong>Rails\u306e\u547d\u540d\u898f\u5247<\/strong><\/span>\u306b\u3057\u305f\u304c\u3063\u3066\u6b21\u306e\u3088\u3046\u306b\u547d\u540d\u3059\u308b\u3053\u3068\u3092\u30aa\u30b9\u30b9\u30e1\u3057\u307e\u3059\u3002<\/p>\n\n<table id=\"tablepress-554\" class=\"tablepress tablepress-id-554\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">\u64cd\u4f5c\u5185\u5bb9<\/th><th class=\"column-2\">\u30af\u30e9\u30b9\u540d<\/th><th class=\"column-3\">\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210<\/td><td class=\"column-2\">Create\u30c6\u30fc\u30d6\u30eb\u540d<\/td><td class=\"column-3\"><code>bin\/rails g migration CreateSample<\/code><\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">\u30c6\u30fc\u30d6\u30eb\u306e\u524a\u9664<\/td><td class=\"column-2\">Drop\u30c6\u30fc\u30d6\u30eb\u540d<\/td><td class=\"column-3\"><code>bin\/rails g migration DropSample<\/code><\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">\u30ab\u30e9\u30e0\u306e\u8ffd\u52a0<\/td><td class=\"column-2\">Add\u30ab\u30e9\u30e0\u540dTo\u30c6\u30fc\u30d6\u30eb\u540d<\/td><td class=\"column-3\"><code>bin\/rails g migration AddColumnToSample<\/code><\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">\u30ab\u30e9\u30e0\u306e\u524a\u9664<\/td><td class=\"column-2\">Remove\u30ab\u30e9\u30e0\u540dFrom\u30c6\u30fc\u30d6\u30eb\u540d<\/td><td class=\"column-3\"><code>bin\/rails g migration RemoveColmnFromSample<\/code><\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">\u30ab\u30e9\u30e0\u540d\u306e\u5909\u66f4<\/td><td class=\"column-2\">RenameFrom\u5909\u66f4\u524d\u30ab\u30e9\u30e0\u540dTo\u5909\u66f4\u5f8c\u30ab\u30e9\u30e0\u540dOn\u30c6\u30fc\u30d6\u30eb\u540d<\/td><td class=\"column-3\"><code>bin\/rails g migration RenameFromBeforeColumnToAfterCoulumnOnSample<\/code><\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">\u30ab\u30e9\u30e0\u306e\u5b9a\u7fa9\u3092\u5909\u66f4<\/td><td class=\"column-2\">Change\u5909\u66f4\u3059\u308b\u30ab\u30e9\u30e0On\u30c6\u30fc\u30d6\u30eb\u540d<\/td><td class=\"column-3\"><code>bin\/rails g migration ChangeColumnOnSample<\/code><\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">Index\u306e\u4f5c\u6210<\/td><td class=\"column-2\">AddIndex\u30ab\u30e9\u30e0\u540dTo\u30c6\u30fc\u30d6\u30eb\u540d<\/td><td class=\"column-3\"><code>bin\/rails g migration AddIndexColumnToSample<\/code><\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">Index\u306e\u524a\u9664<\/td><td class=\"column-2\">RemoveIndex\u30ab\u30e9\u30e0\u540dFrom\u30b5\u30f3\u30d7\u30eb<\/td><td class=\"column-3\"><code>bin\/rails g migration RemoveIndexColumnFromSample<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-554 from cache -->\n<p>Rails\u306e\u547d\u540d\u898f\u5247\u306b\u5f93\u3046\u3068\u3001\u3044\u3064\u3069\u306e\u3088\u3046\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u3057\u305f\u304b\u304c<span style=\"color: #0000ff\"><strong>\u6642\u7cfb\u5217\u3067\u308f\u304b\u308b\u306e\u3067\u3001<\/strong><\/span>\u958b\u767a\u4e2d\u306e\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u306e\u3084\u308a\u76f4\u3057\u304c\u5bb9\u6613\u3067\u3059\u3002<\/p>\n<h3>migration\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b2\u3064\u306e\u65b9\u6cd5<\/h3>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f<span style=\"color: #ff0000\"><strong>2\u3064\u306e\u65b9\u6cd5<\/strong><\/span>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li>\u300cbin\/rails g migration \u30af\u30e9\u30b9\u540d <span style=\"color: #339966\"><strong>\u30ab\u30e9\u30e0\u540d:\u578b<\/strong><\/span>\u300d\u3067\u5f15\u6570\u306b\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3092\u6e21\u3059<\/li>\n<li>\u300cbin\/rails g migration \u30af\u30e9\u30b9\u540d\u300d\u3067\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3092<span style=\"color: #339966\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0<\/strong><\/span><\/li>\n<\/ol>\n<p>\u524d\u8005\u306f\u3001\u7c21\u5358\u306a\u30c6\u30fc\u30d6\u30eb\u64cd\u4f5c\u306e\u5834\u5408\u306f\u4f7f\u3044\u52dd\u624b\u304c\u3088\u3044\u3067\u3059\u304c\u3001\u8907\u96d1\u306a\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u306e\u5834\u5408\u306f\u7169\u96d1\u3067\u4f7f\u3044\u306b\u304f\u3044\u305f\u3081\u3001<span style=\"color: #0000ff\"><strong>\u5f8c\u8005\u306e\u65b9\u6cd5\u3067\u4f5c\u6210\u3059\u308b\u3053\u3068\u3092\u30aa\u30b9\u30b9\u30e1<\/strong><\/span>\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u964d\u3067\u306f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306e\u8a18\u8ff0\u65b9\u6cd5\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3><strong>migration\u30d5\u30a1\u30a4\u30eb\u306e\u30c7\u30fc\u30bf\u578b\u4e00\u89a7<\/strong><\/h3>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3067\u6271\u3048\u308b<span style=\"color: #339966\"><strong>\u30c7\u30fc\u30bf\u578b<\/strong><\/span>\u3092\u4e00\u89a7\u306b\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<p>MySQL\u3067\u306e\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u306e\u72b6\u614b\u3082\u6bd4\u8f03\u3057\u305f\u306e\u3067\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\uff1a<\/p>\n<pre class=\"lang:ruby decode:true \">class CreateSample &lt; ActiveRecord::Migration[5.1]\r\n  def change\r\n    create_table :samples do |t|\r\n      t.string    :string_col       # \u6587\u5b57\u5217\r\n      t.text      :text_col         # \u9577\u3044\u6587\u5b57\u5217\r\n      t.integer   :integer_col      # \u6574\u6570\r\n      t.float     :float_col        # \u6d6e\u52d5\u5c0f\u6570\u70b9\u6570(float)\r\n      t.decimal   :decimal_col      # \u6d6e\u52d5\u5c0f\u6570\u70b9\u6570(decimal)\r\n      t.datetime  :datetime_col     # \u65e5\u6642\r\n      t.date      :date_col         # \u65e5\u4ed8\r\n      t.time      :time_col         # \u6642\u9593\r\n      t.timestamp :timestamp_col    # \u65e5\u6642(timestamp)\r\n      t.boolean   :boolean_col      # true:1, false:0\r\n      t.binary    :binary_col       # \u30d0\u30a4\u30ca\u30ea(blob)\r\n      t.references :sample2         # \u53c2\u7167(sample2s\u30c6\u30fc\u30d6\u30eb)\r\n    end\r\n  end\r\nend\r\n<\/pre>\n<p>\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9:<\/p>\n<pre class=\"lang:mysql decode:true\">mysql&gt; desc samples;\r\n+---------------+---------------+------+-----+---------+----------------+\r\n| Field         | Type          | Null | Key | Default | Extra          |\r\n+---------------+---------------+------+-----+---------+----------------+\r\n| id            | bigint(20)    | NO   | PRI | NULL    | auto_increment |\r\n| string_col    | varchar(255)  | YES  |     | NULL    |                |\r\n| text_col      | text          | YES  |     | NULL    |                |\r\n| integer_col   | int(11)       | YES  |     | NULL    |                |\r\n| float_col     | float         | YES  |     | NULL    |                |\r\n| decimal_col   | decimal(10,0) | YES  |     | NULL    |                |\r\n| datetime_col  | datetime      | YES  |     | NULL    |                |\r\n| date_col      | date          | YES  |     | NULL    |                |\r\n| time_col      | time          | YES  |     | NULL    |                |\r\n| timestamp_col | timestamp     | YES  |     | NULL    |                |\r\n| boolean_col   | tinyint(1)    | YES  |     | NULL    |                |\r\n| binary_col    | blob          | YES  |     | NULL    |                |\r\n| sample2_id    | bigint(20)    | YES  | MUL | NULL    |                |\r\n+---------------+---------------+------+-----+---------+----------------+\r\n13 rows in set (0.00 sec)\r\n<\/pre>\n<p>\u306a\u304a\u3001PostgreSQL\u3084SQLite\u306a\u3069\u306e\u5229\u7528\u3059\u308bRDMS\u306e\u9055\u3044\u3092\u610f\u8b58\u3057\u306a\u304f\u3066\u3082\u3044\u3044\u3088\u3046\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u306f\u884c\u308f\u308c\u3066\u3044\u308b\u306e\u3067\u3001<span style=\"color: #0000ff\"><strong><span style=\"color: #0000ff\"><strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3054\u3068\u306e<\/strong><\/span>\u8a18\u8ff0\u3092\u5909\u3048\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p>\u4fbf\u5229\u3067\u3059\u306d\uff01<\/p>\n<h3>migration\u30d5\u30a1\u30a4\u30eb\u306e\u30ab\u30e9\u30e0\u30aa\u30d7\u30b7\u30e7\u30f3\u4e00\u89a7<\/h3>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306f\u3001NULL\u5236\u7d04\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3001\u9577\u3055\u306a\u3069\u306e<span style=\"color: #339966\"><strong>\u30ab\u30e9\u30e0\u30aa\u30d7\u30b7\u30e7\u30f3<\/strong><\/span>\u3092\u4efb\u610f\u306b\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\uff1a<\/p>\n<pre class=\"lang:ruby decode:true \">class CreateSample2 &lt; ActiveRecord::Migration[5.1]\r\n  def change\r\n    create_table :sample2s do |t|\r\n      t.string  :not_null, null: false           # NOT NULL\u5236\u7d04\r\n      t.string  :unique,   unique: true          # \u30e6\u30cb\u30fc\u30af\u5236\u7d04\r\n      t.string  :default,  default: \"default\"    # \u30c7\u30d5\u30a9\u30eb\u30c8\u5024\r\n      t.string  :limit,    limit: 10             # LIMIT(\u6700\u5927\u9577)\r\n      t.string  :index,    index: true           # \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\r\n      t.string  :index,    comment: \"comment!\"   # \u30b3\u30e1\u30f3\u30c8\r\n    end\r\n  end\r\nend<\/pre>\n<p>\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\uff1a<\/p>\n<pre class=\"lang:mysql decode:true\">CREATE TABLE `sample2s` (\r\n  `id`       bigint(20)   NOT NULL AUTO_INCREMENT,\r\n  `not_null` varchar(255) NOT NULL,\r\n  `unique`   varchar(255) DEFAULT NULL,\r\n  `default`  varchar(255) DEFAULT 'default',\r\n  `limit`    varchar(10)  DEFAULT NULL,\r\n  `index`    varchar(255) DEFAULT NULL COMMENT 'comment!',\r\n  PRIMARY KEY (`id`),\r\n  KEY `index_sample2s_on_index` (`index`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 |<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<span style=\"color: #0000ff\"><strong>\u30ab\u30e9\u30e0\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9<\/strong><\/span>\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3064\u3065\u3044\u3066\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306e\u3044\u308d\u3044\u308d\u306a\u66f8\u304d\u65b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>migration\u30d5\u30a1\u30a4\u30eb\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081<\/h2>\n<p>\u3053\u3053\u3067\u306f\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306e\u8a73\u3057\u3044\u66f8\u304d\u65b9\u3092\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<h3>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306e\u57fa\u672c\u69cb\u9020<\/h3>\n<p>\u300cbin\/rails g migration \u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u540d\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068<span style=\"color: #339966\"><strong><span style=\"color: #0000ff\"><strong>\u7a7a\u306echange\u30e1\u30bd\u30c3\u30c9<\/strong><\/span><\/strong><\/span>\u304c\u5b9a\u7fa9\u3055\u308c\u305f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"lang:ruby decode:true\">class \u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30af\u30e9\u30b9\u540d &lt; ActiveRecord::Migration[5.1]\r\n  def change\r\n     # \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30ad\u30fc\u30de\u3078\u306e\u5b9a\u7fa9\u3092\u8a18\u8ff0\r\n  end\r\nend\r\n<\/pre>\n<p>\u5177\u4f53\u7684\u306a\u30c6\u30fc\u30d6\u30eb\u8ffd\u52a0\u306a\u3069\u306e\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u306f<span style=\"color: #339966\"><strong>change\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u306e\u5185\u5bb9\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b21\u9805\u3092\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u5b9a\u7fa9\u30e1\u30bd\u30c3\u30c9\u4e00\u89a7<\/h3>\n<p>change\u30e1\u30bd\u30c3\u30c9\u5185\u306b\u8a18\u8ff0\u3067\u304d\u308b<span style=\"color: #0000ff\"><strong>\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u306e\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u4e00\u89a7<\/strong><\/span>\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n<table id=\"tablepress-555\" class=\"tablepress tablepress-id-555\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">\u30e1\u30bd\u30c3\u30c9<\/th><th class=\"column-2\">\u8aac\u660e<\/th><th class=\"column-3\">\u7c21\u5358\u306a\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">create_table<\/td><td class=\"column-2\">\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210<\/td><td class=\"column-3\"><code>create_table :\u30c6\u30fc\u30d6\u30eb\u540d do |t|<br \/>\n t.\u578b :\u30ab\u30e9\u30e0\u540d<br \/>\nend<\/code><\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">drop_table<\/td><td class=\"column-2\">\u30c6\u30fc\u30d6\u30eb\u306e\u524a\u9664<\/td><td class=\"column-3\"><code>drop_table :\u30c6\u30fc\u30d6\u30eb\u540d<\/code><\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">add_column<\/td><td class=\"column-2\">\u30ab\u30e9\u30e0\u306e\u8ffd\u52a0<\/td><td class=\"column-3\"><code>add_column :\u30c6\u30fc\u30d6\u30eb\u540d, :\u30ab\u30e9\u30e0\u540d, :\u578b<\/code><\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">remove_column<br \/>\n<\/td><td class=\"column-2\">\u30ab\u30e9\u30e0\u306e\u524a\u9664<\/td><td class=\"column-3\"><code>remove_column :\u30c6\u30fc\u30d6\u30eb\u540d, :\u30ab\u30e9\u30e0\u540d<br \/>\n<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">change_column<\/td><td class=\"column-2\">\u30ab\u30e9\u30e0\u306e\u5b9a\u7fa9\u306e\u5909\u66f4<\/td><td class=\"column-3\"><code>change_column :\u30c6\u30fc\u30d6\u30eb\u540d, :\u30ab\u30e9\u30e0\u540d, :\u578b [, \u30ab\u30e9\u30e0\u30aa\u30d7\u30b7\u30e7\u30f3]<\/code><\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">rename_column<\/td><td class=\"column-2\">\u30ab\u30e9\u30e0\u540d\u306e\u5909\u66f4<\/td><td class=\"column-3\"><code>rename_column :\u30c6\u30fc\u30d6\u30eb\u540d, :\u5909\u66f4\u524d\u30ab\u30e9\u30e0\u540d, :\u5909\u66f4\u5f8c\u30ab\u30e9\u30e0\u540d<\/code><\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">add_index<\/td><td class=\"column-2\">\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f5c\u6210<\/td><td class=\"column-3\"><code>add_index :\u30c6\u30fc\u30d6\u30eb\u540d, :\u30ab\u30e9\u30e0\u540d<br \/>\n# \u8907\u5408Index<br \/>\nadd_index :\u30c6\u30fc\u30d6\u30eb\u540d, [:\u30ab\u30e9\u30e0\u540d,:\u30ab\u30e9\u30e0\u540d]<\/code><\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">remove_index<\/td><td class=\"column-2\">\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u524a\u9664<\/td><td class=\"column-3\"><code>remove_index :\u30c6\u30fc\u30d6\u30eb\u540d, :\u30ab\u30e9\u30e0\u540d<\/code><\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">add_reference<\/td><td class=\"column-2\">\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9(\u5916\u90e8\u53c2\u7167)\u306e\u4f5c\u6210<\/td><td class=\"column-3\"><code>add_reference :\u30c6\u30fc\u30d6\u30eb\u540d, :\u53c2\u7167\u540d,[ polymorphic: true, index: true]<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-555 from cache -->\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<span style=\"color: #0000ff\"><strong>SQL\u306e\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3068\u540c\u7b49\u306e\u3053\u3068\u304c\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3067\u5b9a\u7fa9\u3067\u304d\u308b<\/strong><\/span>\u3053\u3068\u304c\u304a\u5206\u304b\u308a\u9802\u3051\u305f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u964d\u3067\u306f\u3001\u4ee3\u8868\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u4ea4\u3048\u3066\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30ab\u30e9\u30e0\u306e\u8ffd\u52a0(add_column)<\/h3>\n<p>\u30ab\u30e9\u30e0\u8ffd\u52a0\u306e\u5b9a\u7fa9\u306f\u3001<\/p>\n<ul>\n<li><span style=\"color: #339966\"><strong>add_column<\/strong><\/span> :\u30c6\u30fc\u30d6\u30eb\u540d, :\u30ab\u30e9\u30e0\u540d, :\u30c7\u30fc\u30bf\u578b [,\u30ab\u30e9\u30e0\u30aa\u30d7\u30b7\u30e7\u30f3]<\/li>\n<\/ul>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>string_col\u30ab\u30e9\u30e0\u3092\u8ffd\u52a0\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8(bin\/rails db:migrate)\u3059\u308b\u524d\uff1a<\/p>\n<pre class=\"lang:mysql decode:true\">mysql&gt; desc samples;\r\n+-------------+--------------+------+-----+---------+----------------+\r\n| Field       | Type         | Null | Key | Default | Extra          |\r\n+-------------+--------------+------+-----+---------+----------------+\r\n| id          | bigint(20)   | NO   | PRI | NULL    | auto_increment |\r\n| name        | varchar(255) | YES  |     | NULL    |                |\r\n+-------------+--------------+------+-----+---------+----------------+\r\n2 rows in set (0.00 sec)<\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true\">bin\/rails g migration AddStringCol2ToCreateSample\r\nRunning via Spring preloader in process 12905\r\n      invoke  active_record\r\n      create    db\/migrate\/20180627051701_add_string_col2_to_create_sample.rb\r\n<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\uff1a<\/p>\n<pre class=\"lang:ruby decode:true\">class AddStringCol2ToCreateSample &lt; ActiveRecord::Migration[5.1]\r\n  def change\r\n   add_column :samples, :string_col2, :string\r\n  end\r\nend\r\n<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8(bin\/rails db:migrate)\u3057\u305f\u5f8c\uff1a<\/p>\n<pre class=\"lang:mysql decode:true\">mysql&gt; desc samples;\r\n+-------------+--------------+------+-----+---------+----------------+\r\n| Field       | Type         | Null | Key | Default | Extra          |\r\n+-------------+--------------+------+-----+---------+----------------+\r\n| id          | bigint(20)   | NO   | PRI | NULL    | auto_increment |\r\n| name        | varchar(255) | YES  |     | NULL    |                |\r\n| string_col2 | varchar(255) | YES  |     | NULL    |                |\r\n+-------------+--------------+------+-----+---------+----------------+\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u30ab\u30e9\u30e0\u8ffd\u52a0\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h3>\u30ab\u30e9\u30e0\u5b9a\u7fa9\u306e\u5909\u66f4(change_column)<\/h3>\n<p>\u30ab\u30e9\u30e0\u306e\u5b9a\u7fa9\u306e\u5909\u66f4\u306f<\/p>\n<ul>\n<li><span style=\"color: #339966\"><strong>change_column<\/strong><\/span> :\u30c6\u30fc\u30d6\u30eb\u540d, :\u30ab\u30e9\u30e0\u540d, \u5909\u66f4\u5f8c\u306e\u5b9a\u7fa9<\/li>\n<\/ul>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>string\u578b\u306e\u30ab\u30e9\u30e0\u3092integer\u306b\u5909\u66f4\u3057\u3001\u30ab\u30e9\u30e0\u306e\u540d\u5909\u66f4\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true\">bin\/rails g migration ChangeString2ColOnSample\r\nRunning via Spring preloader in process 13061\r\n      invoke  active_record\r\n      create    db\/migrate\/20180627052857_change_string2_col_on_sample.rb\r\n<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\uff1a<\/p>\n<pre class=\"lang:ruby decode:true\">class ChangeString2ColOnSample &lt; ActiveRecord::Migration[5.1]\r\n def change\r\n   change_column :samples, :string_col2, :integer\r\n   rename_column :samples, :string_col2, :int_col2\r\n end\r\nend\r\n<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8(bin\/rails db:migrate)\u3057\u305f\u5f8c\uff1a<\/p>\n<pre class=\"lang:mysql decode:true\">mysql&gt; desc samples;\r\n+-------------+--------------+------+-----+---------+----------------+\r\n| Field       | Type         | Null | Key | Default | Extra          |\r\n+-------------+--------------+------+-----+---------+----------------+\r\n| id          | bigint(20)   | NO   | PRI | NULL    | auto_increment |\r\n| name        | varchar(255) | YES  |     | NULL    |                |\r\n| int_col2    | int(11)      | YES  |     | NULL    |                |\r\n+-------------+--------------+------+-----+---------+----------------+\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u306f\u3068\u3066\u3082\u30ab\u30f3\u30bf\u30f3\u306a\u3053\u3068\u304c\u304a\u5206\u304b\u308a\u9802\u3051\u305f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>migration\u3092\u7ba1\u7406\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/h2>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u306e<span style=\"color: #0000ff\"><strong>\u53cd\u6620\u72b6\u6cc1<\/strong><\/span>\u3084\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092<span style=\"color: #ff0000\"><strong>\u30ed\u30fc\u30eb\u30d0\u30c3\u30af<\/strong><\/span>\u3092\u3059\u308b\u305f\u3081\u306e\u4fbf\u5229\u306a\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h3>migration\u306e\u72b6\u6cc1\u3092\u898b\u308b(rails db:migrate:status)<\/h3>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u300c<span style=\"color: #339966\"><strong>bin\/rails db:migrate<\/strong><\/span>\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u304c\u3001<span style=\"color: #ff0000\"><strong>\u3069\u306e\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u3069\u3053\u307e\u3067\u5b9f\u884c\u3057\u305f\u304b<\/strong><\/span>\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u306f\u3001<\/p>\n<ul>\n<li>bin\/rails <span style=\"color: #339966\"><strong>db:migrate:status<\/strong><\/span><\/li>\n<\/ul>\n<p>\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true\">$ bin\/rails db:migrate:status\r\nRunning via Spring preloader in process 12582\r\ndatabase: sample_app_development\r\n\r\n Status   Migration ID    Migration Name\r\n--------------------------------------------------\r\n   up     20180626081942  Create sample\r\n  down    20180626091939  Change string2 col on sample1\r\n<\/pre>\n<p><span style=\"color: #339966\"><strong>Status<\/strong><\/span>\u306e\u898b\u65b9\u306f\u3001<\/p>\n<ul>\n<li>up \u3000\u3000\u2192 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u53cd\u6620\u6e08<\/li>\n<li>down\u00a0 \u00a0 \u2192\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u672a\u53cd\u6620<\/li>\n<\/ul>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u3057\u305f\u5f8c\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u30b3\u30de\u30f3\u30c9\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true\">$ bin\/rails db:migrate\r\nRunning via Spring preloader in process 12620\r\n== 20180626091939 ChangeString2ColOnSample1: migrating ========================\r\n<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u30b9\u30c6\u30fc\u30bf\u30b9\u78ba\u8a8d\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">$ bin\/rails db:migrate:status\r\nRunning via Spring preloader in process 12658\r\ndatabase: sample_app_development\r\n\r\n Status   Migration ID    Migration Name\r\n--------------------------------------------------\r\n   up     20180626081942  Create sample\r\n   up     20180626091939  Change string2 col on sample1\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001down\u304b\u3089up\u3057\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53cd\u6620\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h3>migration\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b(rails db:rollback)<\/h3>\n<p>\u53cd\u6620\u3057\u305f\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u623b\u3059\u305f\u3081\u306b\u306f\u3001\u300c<span style=\"color: #339966\"><strong>bin\/rails db:rollback<\/strong><\/span>\u300d\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u3067\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true\">$ bin\/rails db:rollback\r\nRunning via Spring preloader in process 12696\r\n== 20180626091939 ChangeString2ColOnSample1: reverting ========================\r\n== 20180626091939 ChangeString2ColOnSample1: reverted (0.0074s) ===============\r\n<\/pre>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30c8\u30b9\u30c6\u30fc\u30bf\u30b9\u78ba\u8a8d\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Running via Spring preloader in process 12734\r\n\r\ndatabase: sample_app_development\r\n\r\n Status   Migration ID    Migration Name\r\n--------------------------------------------------\r\n   up     20180626081942  Create sample\r\n  down    20180626091939  Change string2 col on sample1<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306bup\u2192down\u306b\u5909\u308f\u308a\u3001\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u30921\u3064\u623b\u3059\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u624b\u9806\u3092\u4e0a\u304b\u3089\u9806\u306b\u5b9f\u884c\u3057\u305f\u5834\u5408\u3001change_column\u306e\u90e8\u5206\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u3053\u308c\u306fchange\u30e1\u30bd\u30c3\u30c9\u306e\u884c\u3048\u308b\u51e6\u7406\u306bchange_column\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3067\u3059\u3002\u5bfe\u51e6\u6cd5\u306b\u95a2\u3057\u3066\u306f\u516c\u5f0f\u306b\u624b\u9806\u304c\u8a18\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u3061\u3089\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u53c2\u7167\uff1a<a href=\"https:\/\/railsguides.jp\/active_record_migrations.html\" target=\"_blank\" rel=\"noopener\">Active Record \u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3<\/a><\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3044\u304b\u304b\u3067\u3057\u305f\u304b\uff1f<\/p>\n<p>\u4eca\u56de\u306f<span style=\"color: #339966\"><strong>generate migration\u30b3\u30de\u30f3\u30c9<\/strong><\/span>\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>generate migration\u3068\u306f\u3001<span style=\"color: #0000ff\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3(migration)\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/strong><\/span>\u3059\u308b\u305f\u3081\u306eRuby on Rails\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002<\/p>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3(migration)\u306e\u4f7f\u3044\u65b9\u3092\u899a\u3048\u308b\u3068\u3001<span style=\"color: #0000ff\"><strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u8ffd\u52a0\u30fb\u5909\u66f4\u30fb\u524a\u9664\u3092\u4f55\u5ea6\u3067\u3082\u7e70\u308a\u8fd4\u3057\u5b9f\u884c<\/strong><\/span>\u3067\u304d\u308b\u306e\u3067\u3001\u305c\u3072\u6d3b\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001generate migration\u306e\u4f7f\u3044\u65b9\u3092\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u3089\u3053\u306e\u8a18\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u306d\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\uff01\u30b7\u30b9\u30c6\u30e0\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30aa\u30aa\u30a4\u30b7\u3067\u3059\u3002 Ruby on Rails\u306egenerate migration\u30b3\u30de\u30f3\u30c9\u3092\u3054\u5b58\u77e5\u3067\u3059\u304b\uff1f generate migration\u30b3\u30de\u30f3\u30c9\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u306e\u7d99\u7d9a\u7684\u306a\u8ffd\u52a0 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":60952,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2352],"tags":[1542,14],"class_list":["post-60950","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-study","tag-generate-migration","tag-ruby-on-rails"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/60950\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/60950\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"1970-01-01T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:49:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:49:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950\"},\"wordCount\":192,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/rails_g_migration.jpg\",\"keywords\":[\"generate migration\",\"Ruby on Rails\"],\"articleSection\":[\"Ruby\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950\",\"name\":\"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/rails_g_migration.jpg\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:49:09+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/rails_g_migration.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/rails_g_migration.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/60950#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/60950","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/60950","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"1970-01-01T00:00:00+00:00","article_modified_time":"2024-05-06T02:49:09+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/60950#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/60950"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:49:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/60950"},"wordCount":192,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/60950#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration.jpg","keywords":["generate migration","Ruby on Rails"],"articleSection":["Ruby\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/60950","url":"https:\/\/www.sejuku.net\/blog\/60950","name":"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/60950#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/60950#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration.jpg","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:49:09+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/60950#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/60950"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/60950#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/06\/rails_g_migration.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/60950#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Rails\u5165\u9580\u3011generate migration\u30b3\u30de\u30f3\u30c9\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u307e\u3068\u3081"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/60950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=60950"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/60950\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/60952"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=60950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=60950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=60950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}