ekwo-os 0.21.1 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "0.21.0",
3
- "migration": "20261026030000",
3
+ "migration": "20261027073538",
4
4
  "socle": {
5
5
  "schema": "public",
6
6
  "tables": [
@@ -0,0 +1,27 @@
1
+ -- ---------------------------------------------------------------------------
2
+ -- An archive carries its own clock
3
+ -- ---------------------------------------------------------------------------
4
+ -- `20261015042916` gave the calls that carry a whole company a clock of their
5
+ -- own, raised by the pre-request hook from the path PostgREST names
6
+ -- (`is_archive_request()`, `archive_statement_timeout()`). On a hosted
7
+ -- project that raise does not always reach the work: the nightly copy of a
8
+ -- company of about 20 MB, taken with a key, still stops one night in two with
9
+ -- `canceling statement due to statement timeout`.
10
+ --
11
+ -- So each of those functions now says its clock itself, as a setting of the
12
+ -- function. PostgREST reads a function's `statement_timeout` and applies it to
13
+ -- the request that calls it, before the call; a request that reaches the
14
+ -- function another way (the command line, `psql`) is unchanged, since the
15
+ -- clock of a statement already running is not moved by a function it calls.
16
+ -- The value is `archive_statement_timeout()`'s, five minutes; a test holds the
17
+ -- two equal. The pre-request raise stays: it covers a PostgREST that does not
18
+ -- read function settings.
19
+ --
20
+ -- `alter function … set` keeps every body, signature and grant as it is.
21
+ -- ---------------------------------------------------------------------------
22
+
23
+ alter function export_company(uuid) set statement_timeout = '5min';
24
+ alter function export_company_manifest(uuid) set statement_timeout = '5min';
25
+ alter function export_company_tables(uuid) set statement_timeout = '5min';
26
+ alter function export_company_table(uuid, text) set statement_timeout = '5min';
27
+ alter function import_company(jsonb, uuid) set statement_timeout = '5min';
@@ -210,3 +210,13 @@ on conflict (code) do nothing;
210
210
  insert into currencies (code, name, symbol, decimal_places) values
211
211
  ('WST', 'Samoan tala', 'WS$', 2)
212
212
  on conflict (code) do nothing;
213
+
214
+ -- Tongan paʻanga, ISO 4217 list one, two decimals (packs/to/).
215
+ insert into currencies (code, name, symbol, decimal_places) values
216
+ ('TOP', 'Tongan paʻanga', 'T$', 2)
217
+ on conflict (code) do nothing;
218
+
219
+ -- Vanuatu vatu, ISO 4217 list one, no decimals (packs/vu/).
220
+ insert into currencies (code, name, symbol, decimal_places) values
221
+ ('VUV', 'Vanuatu vatu', 'VT', 0)
222
+ on conflict (code) do nothing;
@@ -3194,3 +3194,27 @@ on conflict (code) do update set
3194
3194
  eu_vat_to = excluded.eu_vat_to,
3195
3195
  vat_prefix = excluded.vat_prefix,
3196
3196
  legal_reference = excluded.legal_reference;
3197
+ insert into territories (code, code_source, name, parent_code, eu_vat_scope, eu_vat_from, eu_vat_to, vat_prefix, legal_reference) values
3198
+ ('TO', 'iso_3166_1', 'Tonga', null, 'none', null, null, null,
3199
+ 'Directive 2006/112/EC, article 5(2): the common system of VAT applies in the territory of the Community as defined by the Treaties, and a State outside it is a third country for every rule the Directive carries. Tonga levies a consumption tax of its own under the Consumption Tax Act 2003: the Ministry of Revenue and Customs administers it at a rate of 15 per cent, exports and the other supplies of the Orders made under section 5(3)(a) are zero-rated, health, education, financial services, public transport and residential land leases are exempt, and a registered person files a return, form CT206, for each month within 28 days after its end.')
3200
+ on conflict (code) do update set
3201
+ code_source = excluded.code_source,
3202
+ name = excluded.name,
3203
+ parent_code = excluded.parent_code,
3204
+ eu_vat_scope = excluded.eu_vat_scope,
3205
+ eu_vat_from = excluded.eu_vat_from,
3206
+ eu_vat_to = excluded.eu_vat_to,
3207
+ vat_prefix = excluded.vat_prefix,
3208
+ legal_reference = excluded.legal_reference;
3209
+ insert into territories (code, code_source, name, parent_code, eu_vat_scope, eu_vat_from, eu_vat_to, vat_prefix, legal_reference) values
3210
+ ('VU', 'iso_3166_1', 'Vanuatu', null, 'none', null, null, null,
3211
+ 'Directive 2006/112/EC, article 5(2): the common system of VAT applies in the territory of the Community as defined by the Treaties, and a State outside it is a third country for every rule the Directive carries. Vanuatu levies a value added tax of its own under the Value Added Tax Act [Cap. 247]: the Department of Customs and Inland Revenue administers it at 15 per cent, the Act zero-rates exports and the other supplies of its Schedule 3 and exempts those of its Schedule 1, and a registered person files a monthly or, under eight million vatu of supplies, a three-monthly return.')
3212
+ on conflict (code) do update set
3213
+ code_source = excluded.code_source,
3214
+ name = excluded.name,
3215
+ parent_code = excluded.parent_code,
3216
+ eu_vat_scope = excluded.eu_vat_scope,
3217
+ eu_vat_from = excluded.eu_vat_from,
3218
+ eu_vat_to = excluded.eu_vat_to,
3219
+ vat_prefix = excluded.vat_prefix,
3220
+ legal_reference = excluded.legal_reference;