mirror of
https://github.com/google/nomulus.git
synced 2025-07-10 05:03:24 +02:00
Rename client_id to registrar_id in SQL (#619)
We'll eventually want to shift everything over to using registrar_id and registrarId rather than client_id and clientId but for the sake of the Datastore schema and existing code, we won't change the Java identifier for now. Once we're completely and only on SQL, we can rename the Java field easily.
This commit is contained in:
parent
436137444a
commit
1a1f5740a4
9 changed files with 104 additions and 67 deletions
|
@ -68,11 +68,11 @@ public abstract class EppResource extends BackupGroupRoot implements Buildable {
|
|||
|
||||
/** The ID of the registrar that is currently sponsoring this resource. */
|
||||
@Index
|
||||
@Column(nullable = false)
|
||||
@Column(name = "currentSponsorRegistrarId", nullable = false)
|
||||
String currentSponsorClientId;
|
||||
|
||||
/** The ID of the registrar that created this resource. */
|
||||
@Column(nullable = false)
|
||||
@Column(name = "creationRegistrarId", nullable = false)
|
||||
String creationClientId;
|
||||
|
||||
/**
|
||||
|
@ -82,6 +82,7 @@ public abstract class EppResource extends BackupGroupRoot implements Buildable {
|
|||
* edits; it only includes EPP-visible modifications such as {@literal <update>}. Can be null if
|
||||
* the resource has never been modified.
|
||||
*/
|
||||
@Column(name = "lastEppUpdateRegistrarId")
|
||||
String lastEppUpdateClientId;
|
||||
|
||||
/** The time when this resource was created. */
|
||||
|
|
|
@ -116,7 +116,7 @@ public abstract class BillingEvent extends ImmutableObject
|
|||
|
||||
/** The registrar to bill. */
|
||||
@Index
|
||||
@Column(nullable = false)
|
||||
@Column(name = "registrarId", nullable = false)
|
||||
String clientId;
|
||||
|
||||
/** Revision id of the entry in DomainHistory table that ths bill belongs to. */
|
||||
|
@ -267,7 +267,7 @@ public abstract class BillingEvent extends ImmutableObject
|
|||
@javax.persistence.Entity(name = "BillingEvent")
|
||||
@javax.persistence.Table(
|
||||
indexes = {
|
||||
@javax.persistence.Index(columnList = "clientId"),
|
||||
@javax.persistence.Index(columnList = "registrarId"),
|
||||
@javax.persistence.Index(columnList = "eventTime"),
|
||||
@javax.persistence.Index(columnList = "billingTime"),
|
||||
@javax.persistence.Index(columnList = "syntheticCreationTime"),
|
||||
|
@ -440,7 +440,7 @@ public abstract class BillingEvent extends ImmutableObject
|
|||
@javax.persistence.Entity(name = "BillingRecurrence")
|
||||
@javax.persistence.Table(
|
||||
indexes = {
|
||||
@javax.persistence.Index(columnList = "clientId"),
|
||||
@javax.persistence.Index(columnList = "registrarId"),
|
||||
@javax.persistence.Index(columnList = "eventTime"),
|
||||
@javax.persistence.Index(columnList = "recurrenceEndTime"),
|
||||
@javax.persistence.Index(columnList = "recurrence_time_of_year")
|
||||
|
@ -531,7 +531,7 @@ public abstract class BillingEvent extends ImmutableObject
|
|||
@javax.persistence.Entity(name = "BillingCancellation")
|
||||
@javax.persistence.Table(
|
||||
indexes = {
|
||||
@javax.persistence.Index(columnList = "clientId"),
|
||||
@javax.persistence.Index(columnList = "registrarId"),
|
||||
@javax.persistence.Index(columnList = "eventTime"),
|
||||
@javax.persistence.Index(columnList = "billingTime")
|
||||
})
|
||||
|
|
|
@ -56,7 +56,7 @@ import org.joda.time.DateTime;
|
|||
name = "Contact",
|
||||
indexes = {
|
||||
@javax.persistence.Index(columnList = "creationTime"),
|
||||
@javax.persistence.Index(columnList = "currentSponsorClientId"),
|
||||
@javax.persistence.Index(columnList = "currentSponsorRegistrarId"),
|
||||
@javax.persistence.Index(columnList = "deletionTime"),
|
||||
@javax.persistence.Index(columnList = "contactId", unique = true),
|
||||
@javax.persistence.Index(columnList = "searchName")
|
||||
|
|
|
@ -102,7 +102,7 @@ import org.joda.time.Interval;
|
|||
name = "Domain",
|
||||
indexes = {
|
||||
@javax.persistence.Index(columnList = "creationTime"),
|
||||
@javax.persistence.Index(columnList = "currentSponsorClientId"),
|
||||
@javax.persistence.Index(columnList = "currentSponsorRegistrarId"),
|
||||
@javax.persistence.Index(columnList = "deletionTime"),
|
||||
@javax.persistence.Index(columnList = "fullyQualifiedDomainName"),
|
||||
@javax.persistence.Index(columnList = "tld")
|
||||
|
|
|
@ -24,6 +24,7 @@ import google.registry.model.ImmutableObject;
|
|||
import google.registry.model.billing.BillingEvent;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import org.joda.time.DateTime;
|
||||
|
@ -51,6 +52,7 @@ public class GracePeriod extends ImmutableObject {
|
|||
DateTime expirationTime;
|
||||
|
||||
/** The registrar to bill. */
|
||||
@Column(name = "registrarId")
|
||||
String clientId;
|
||||
|
||||
/**
|
||||
|
|
|
@ -236,7 +236,7 @@ public class Registrar extends ImmutableObject
|
|||
*/
|
||||
@Id
|
||||
@javax.persistence.Id
|
||||
@Column(name = "client_id", nullable = false)
|
||||
@Column(name = "registrarId", nullable = false)
|
||||
String clientIdentifier;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue