README.md in pgslice-0.1.2 vs README.md in pgslice-0.1.3

- old
+ new

@@ -91,11 +91,11 @@ ```console $ pgslice prep locations created_at day BEGIN; CREATE TABLE locations_intermediate ( - LIKE locations INCLUDING INDEXES INCLUDING DEFAULTS + LIKE locations INCLUDING ALL ); CREATE FUNCTION locations_insert_trigger() RETURNS trigger AS $$ BEGIN @@ -114,24 +114,33 @@ ```console $ pgslice add_partitions locations --intermediate --past 1 --future 1 BEGIN; CREATE TABLE locations_20160423 ( - LIKE locations_intermediate INCLUDING INDEXES INCLUDING DEFAULTS, CHECK (created_at >= '2016-04-23'::date AND created_at < '2016-04-24'::date) ) INHERITS (locations_intermediate); +ALTER TABLE locations_20160423 ADD PRIMARY KEY (id); + +CREATE INDEX ON locations_20160423 USING btree (updated_at, shopper_id); + CREATE TABLE locations_20160424 ( - LIKE locations_intermediate INCLUDING INDEXES INCLUDING DEFAULTS, CHECK (created_at >= '2016-04-24'::date AND created_at < '2016-04-25'::date) ) INHERITS (locations_intermediate); +ALTER TABLE locations_20160424 ADD PRIMARY KEY (id); + +CREATE INDEX ON locations_20160424 USING btree (updated_at, shopper_id); + CREATE TABLE locations_20160425 ( - LIKE locations_intermediate INCLUDING INDEXES INCLUDING DEFAULTS, CHECK (created_at >= '2016-04-25'::date AND created_at < '2016-04-26'::date) ) INHERITS (locations_intermediate); +ALTER TABLE locations_20160425 ADD PRIMARY KEY (id); + +CREATE INDEX ON locations_20160425 USING btree (updated_at, shopper_id); + COMMIT; ``` ```console $ pgslice swap locations @@ -156,9 +165,14 @@ ```sh gem install specific_install gem specific_install ankane/pgslice ``` + +## TODO + +- Command to sync index changes with partitions +- Disable indexing for faster `fill` ## Contributing Everyone is encouraged to help improve this project. Here are a few ways you can help: