ãã¼ã¿ãã¼ã¹ã®ã¹ãã¼ããå¤æ´ããã¨ãã¯ãã¹ãã¼ãã®å¤æ´ä½æ¥ã«ãã£ã¦ãã¼ãã«ãé·æéããã¯ããã¦ãã¾ããªãããã«æ³¨æãå¿ è¦ã§ãã 2019å¹´ã«ãªãªã¼ã¹ãããPostgreSQL 12.0以éã§ã¯ãNOT NULLãå®å ¨ã«è¿½å ããããã«ãããããã¹ããã©ã¯ãã£ã¹ãã§ãã¦ãã¾ããã¾ã ç¥ããªã人ããããããããªãã®ã§ãããã§ç´¹ä»ãã¾ãã ä½ãåé¡ãªã®ã?次ã®ãããªDDLã³ãã³ããèãã¾ãã -- posts.moderatedãNULLç¦æ¢ã«ãã ALTER TABLE posts ALTER COLUMN moderated SET NOT NULL;ããã¯ãã¼ãã«ãACCESS EXCLUSIVEã§ããã¯ããã¾ã¾ãã«ãã¼ãã«ã¹ãã£ã³ãè¡ãã¾ãããã®éã¯ä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã¯ãã®ãã¼ãã«ã«é¢ããå¦çãé²è¡ã§ãã¾ããã ãã¼ãã«ãå°ãããã°ããã§ç¹ã«åé¡ããã¾ãããããããpostsããããªãã«å¤§
{{#tags}}- {{label}}
{{/tags}}