ddl-manager
Version:
store postgres procedures and triggers in files
107 lines (101 loc) • 3.5 kB
Markdown
+ cache name should be unique for table
+ cancel update rows from prev run (Migrator)
+ new command: update cache rows
+ fix long names > 64
+ fix signature (for detect changes)
+ fix object.toSQL
+ log warning: name XXXX too long (> 64 symbols)
- test errors on:
+ hard select query
+ sub query
+ group by
+ with
+ union
- no hard "order by" for aggregations
+ no column name in select
- no columns
+ column name is not unique
+ exists same column name in another cache in another file
- no universal triggers option: error on using universal triggers
+ diff: compare caches
+ Migrator:
+ i can rename cache but, don't need recreate columns and update rows,
need change only triggers
+ do not drop cache columns if no changes
+ do not drop cache columns if same columns exists in db
+ need REAL load schema
+ universal agg
+ first agg
+ last agg
+ date_or_null_agg
+ cache like are
cache totals for companies (
select companies.id * 2
)
! before insert/update => need listen more fields in other caches
=> use after
+ other helper functions
+ don't create cache triggers for some tables
cache totals for companies (
select
string_agg(distinct order_type.name) as orders_types_names
from orders
left join order_type on
order_type.id = orders.id_order_type
)
without triggers on order_type
- fix renaming file or directory
- find and fix any TODO:
+ log building cache
+ log update cache columns
+ fix package number
+ when need drop function while trigger is frozen, but function not
+ when not all columns or trigger exists for cache, need rebuild cache
- timeline
- test triggers with: select limit 1 order by desc/asc
+ change sleep ms in tests
- remove unfreeze command
- PostgresDriver: add command: commentOn(obj, comment)
- split PostgresDrivers
- refactor: build database state from fs and compare two databases
- test string_agg(distinct some order by some)
- test string_agg(distinct some order by joined field)
- test string_agg(some) filter (where joined field)
- test all combinations for commutative triggers
- create table with all variants
- test array_agg with id as bigint
+ replace all string_agg to UniversalAgg ?
+ remove filter from UniversalAgg
+ and don't aggregate filter values
- filter by companies
+ fix condition: unit.operations && array[ operation.id ]::bigint[]
+ log migration in watcher mode
- test recreating cache after syntax error
- test not( null::text in ('car', 'truck') )
- one last row
+ before insert trigger
+ create helper column
+ test trigger working with Desc by id
+ test trigger working with Asc by id
+ test trigger working with Desc by mutable
+ test trigger working with Asc by mutable
+ test filling __first_auto_for_order flag
- multi reference by array
- test commutative cache working with insert/deleted ids
- data fields change and reference fields change
1. autofix for
bigint[] && integer[]
auto reverse conditions for index scan
1. migrations
2. cache search
2. fix twice build cache
cache orders_ids for request_currency_translation
changes column type
=> need rebuild cache trigger
cache orders_numbers for request_currency_translation
parallel threads by min/max
combine same cache updates
disable all triggers
update also deps caches
rename database while pgMigrate
rename database back on rollback