昨天我们在我们的生产数据库上运行了一个我们认为是安全的模式迁移,但遇到了一个问题。似乎添加新列会导致锁定,我们的应用程序无法再访问该表。以下是迁移前对表的说明:
Table "public.facilities"
Column | Type | Modifiers | Storage | Stats target | Description
-----------------------------------+-----------------------------+---------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('facilities_id_seq'::regclass) | plain | |
name | character varying(255) | | extended | |
phone | character varying(255) | | extended | |
time_zone | character varying(255) | | extended | |
company_id | integer | | plain | |
created_at | timestamp without time zone | | plain | |
updated_at | timestamp without time zone …Run Code Online (Sandbox Code Playgroud)