google-nomulus/docs
Lai Jiang ad4aa73328 Remove ofy support from HistoryEntry (#1823)
This PR removes all Ofy related cruft around `HistoryEntry` and its three subclasses in order to support dual-write to datastore and SQL. The class structure was refactored to take advantage of inheritance to reduce code duplication and improve clarity.

Note that for the embedded EPP resources, either their columns are all empty (for pre-3.0 entities imported into SQL), including their unique foreign key (domain name, host name, contact id) and the update timestamp; or they are filled as expected (for entities that were written since dual writing was implemented).

Therefore the check for foreign key column nullness in the various `@PostLoad` methods in the original code is an no-op as the EPP resource would have been loaded as null. In another word, there is no case where the update timestamp is null but other columns are not.

See the following query for the most recent entries in each table where the foreign key column or the update timestamp are null -- they are the same.

```
[I]postgres=> select MAX(history_modification_time) from "DomainHistory" where update_timestamp is null;
            max
----------------------------
 2021-09-27 15:56:52.502+00
(1 row)

[I]postgres=> select MAX(history_modification_time) from "DomainHistory" where domain_name is null;
            max
----------------------------
 2021-09-27 15:56:52.502+00
(1 row)

[I]postgres=> select MAX(history_modification_time) from "ContactHistory" where update_timestamp is null;
            max
----------------------------
 2021-09-27 15:56:04.311+00
(1 row)

[I]postgres=> select MAX(history_modification_time) from "ContactHistory" where contact_id is null;
            max
----------------------------
 2021-09-27 15:56:04.311+00
(1 row)

[I]postgres=> select MAX(history_modification_time) from "HostHistory" where update_timestamp is null;
            max
----------------------------
 2021-09-27 15:52:16.517+00
(1 row)

[I]postgres=> select MAX(history_modification_time) from "HostHistory" where host_name is null;
            max
----------------------------
 2021-09-27 15:52:16.517+00
(1 row)
```
2022-11-01 21:17:20 -04:00
..
operational-procedures Remove CommitLog and MapReduce-related code (#1670) 2022-06-23 12:54:47 -04:00
src Fix some low-hanging code quality issue fruits (#1047) 2021-04-01 18:04:21 -04:00
admin-tool.md Remove files that are not longer used for create/update premium list (#1288) 2021-08-18 14:04:57 -04:00
architecture.md Rename ContactResource -> Contact (#1763) 2022-08-29 14:48:32 -04:00
authentication-framework.md Rename whitelist -> allow list (#635) 2020-06-18 18:36:05 -04:00
build.gradle Upgrade to Gradle 7.0 (#1712) 2022-07-26 11:41:27 -04:00
buildscript-gradle.lockfile Upgrade to Gradle 7.0 (#1712) 2022-07-26 11:41:27 -04:00
code-structure.md Rename ContactResource -> Contact (#1763) 2022-08-29 14:48:32 -04:00
coding-faq.md Refer to Datastore everywhere correctly by its capitalized form 2017-02-17 12:12:12 -05:00
configuration.md Added info on problematic max-instances param (#1639) 2022-05-19 11:51:27 -04:00
developing.md Rename DomainBase -> Domain (#1725) 2022-08-02 16:03:30 -04:00
first-steps-tutorial.md Update user-facing documentation (#662) 2020-08-17 14:46:32 -04:00
flows.md Remove ofy support from HistoryEntry (#1823) 2022-11-01 21:17:20 -04:00
gradle.lockfile Revert "Upgrade App Engine Standard to Java 17 w/ bundled APIs (#1816)" (#1817) 2022-10-13 10:05:47 -04:00
gradle.md Refactor to be more in line with a standard Gradle project structure 2019-06-13 09:41:11 -04:00
install.md Add docker prerequisite to install guide (#1728) 2022-08-02 16:20:59 -04:00
operational-procedures.md Clarify diff display of MutatingCommand 2017-10-04 16:16:45 -04:00
proxy-setup.md Update terraform files and instructions (#1402) 2021-10-29 09:10:23 -04:00
rdap.md Fix cut-and-paste error in RDAP documentation 2018-03-19 18:31:15 -04:00
registrar-faq.md Rename whitelist -> allow list (#635) 2020-06-18 18:36:05 -04:00