Add a couple of information/commands on the migration.sql
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
a84d763068
commit
9344d7eaf4
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
\timing on
|
||||
|
||||
-- Update the current messages table so it stores the year that we'll partition
|
||||
-- on.
|
||||
|
||||
|
@ -5,6 +7,8 @@ ALTER TABLE messages ADD COLUMN year integer;
|
|||
update messages set year = extract(year from timestamp);
|
||||
|
||||
|
||||
-- Schema extracted using:
|
||||
-- sudo -u postgres pg_dump -t 'public.messages' --schema-only datanommer
|
||||
|
||||
-- Create the messages2 table that will be partitioned and will have the messages
|
||||
-- moved to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue