æ©ãæ²ç¸ãªãã£ã¹ä½ã£ã¦ãããªãããªã¼å¯ãã¦ä»äºã«ãªããªããï¼ã¿ãªããããã«ã¡ã¯ nakamura ã§ãã ãã¼ã³ãå¾ããµã¤ãã®éç¨ãåãæã£ã¦ããã¨ã©ããã¦ãæ©è½è¿½å ãªã©ã§ DB ã®ãã¼ãã«æ§æãå¤ããªãããããªãã£ã¦äºããã¨æãã¾ãããã¼ã¿éããã»ã©å¤ããªããã°åé¡ã«ãªããªãããããã¾ããããMySQL ã® ALTER TABLE ã¯ãã¼ãã«å ¨ä½ã«å¯¾ãã¦æ¸ãè¾¼ã¿ããã¯ãããã¦ãã¾ãããããµã¤ãºã®å¤§ããªãã¼ãã«ã®å ´åçµæ§ãªæéãµã¤ããæ¢ããå¿ è¦ãåºã¦ãã¦ãã¾ã£ãããããããå æ¸ãªãã¨ããªããªãã®ããï¼ã¨æã£ã¦æ¢ãã¦ãããä¸ã ããæãã®ãã¼ã«ãè¦ã¤ããã®ã§ä»åã¯ãã®ãç´¹ä»ã§ãã Percona Toolkit pt-online-schema-change 㯠Percona Toolkit ã¨ãã MySQL ã使ãä¸ã§ã®ä¾¿å©æ©è½ãã¾ã¨ãããã¼ã«ç¾¤ã«å«ã¾ãã¦ãã¾ããpt-online-sc
æ¨æ¥ã«ç¶ããSQLiteã®è©±é¡ãSQLiteã®ãªãã¡ã¬ã³ã¹æ¬ããã©ãã©ã¨ããã£ã¦ããããschema_version, user_versionãªãPRAGMAã³ãã³ããè¦ã¤ãããããã¯ä¸ä½ä½ã ããï¼ schema_versionã«ã¤ãã¦ã¯ãããªèª¬æãè¼ã£ã¦ããã ãã¼ã¿ãã¼ã¹ã«å¤æ´ãå ãããããã³ã«å ç®ããããã¼ã¸ã§ã³çªå·ã管çãã¾ãããã¼ã¸ã§ã³çªå·ãå ç®ãããã®ã¯ããã¼ãã«ãã¤ã³ããã¯ã¹ã®ä½æããã³åé¤ãã¾ãALTER TABLEã«ãããã¼ãã«å®ç¾©ã®æ´æ°æã§ãã SQLiteãå é¨çã«ç®¡çããçªå·ã¨ãããã¨ãªã®ã§ãããã«ä¾åããå¦çãè¨è¿°ããã®ã¯å±éºã ãã©ãåä½ç¢ºèªç¨ã¨ãã¦ã¯ä¾¿å©ããã ã ä¸æ¹ãuser_versionã«ã¤ãã¦ã¯ããã®ååã¨ä¸è¨ã®è§£èª¬ããäºæ³ãããããã«ãã¦ã¼ã¶ãèªç±ã«ä½¿ã£ã¦è¯ãçªå·ã ã ã¦ã¼ã¶ã¼ã«ãã£ã¦è¨å®ã§ãããã¼ã¸ã§ã³çªå·ã管çãã¾ããPRAGMA schema_
ãã¼ãã«å®ç¾©ãå¤æ´ããããã¤ã³ããã¯ã¹ãå£ãã¦ãã¾ã£ãã®ã§åä½æãããããããªå ´åã¯ALTER TABLEã使ããALTER TABLEã¯ãã¼ãã«å®ç¾©ãå¤æ´ããã馴æã¿ã®ã³ãã³ãã§ãããããã®æåã¯æå¤ã¨ç¥ããã¦ããªããï¼ã¨ãã¹ãã¼ãã¨ãã¼ããæ¹ã ããã度ã 質åãåãããï¼ãããªããã§ãä»æ¥ã¯ALTER TABLEã«ã¤ãã¦è§£èª¬ãããã¨æãã ã¾ãçµè«ããè¨ãã¨ããªãã¨MySQLã®ALTER TABLEã¯ãã¼ãã«ã®ãã¼ã¿ãå ¨ã¦ã³ãã¼ãç´ãã®ã§ããããªãã¦ç¡é§ãªãã¨ãï¼ï¼ã¨æãããç¥ããªããããã¼ãã«å®ç¾©ï¼ã¹ãã¼ãï¼ã®å¤æ´ãåçã«è¡ãã«ã¯ãã¹ãã¬ã¼ã¸ã¨ã³ã¸ã³ã«ãããµãã¼ããå¿ è¦ã§ãããåçãªã¹ãã¼ãå¤æ´ããµãã¼ããã¦ããã¹ãã¬ã¼ã¸ã¨ã³ã¸ã³ã¯ã¾ã å°ãªãã®ã§ãããï¼åçã¹ãã¼ãå¤æ´ããµãã¼ããã¦ããã®ã¯MySQL Clusterãããã ãããã追å ã ããï¼ããã©ã«ãã§å©ç¨åºæ¥ãMyISAMã¯Inn
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}