diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3f098fa4..40651378 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -51,17 +51,13 @@ jobs: done ./populatedb.sh - cd - while [ "$(curl -k -L -s -o /dev/null -w "%{http_code}" http://localhost/login)" != "200" ] do sleep 5 done - echo "key=lDxDG5uoqwOhCdeA2d9iHvboTYAcOlVb" > zuliprc - echo "email=test@test.com" >> zuliprc - echo "site=https://localhost" >> zuliprc - echo "insecure=true" >> zuliprc + ./createzuliprc.sh - name: Build JDK ${{ matrix.java }} run: | ./mvnw clean verify -ntp -B diff --git a/pom.xml b/pom.xml index 90ce50fb..df4baaf7 100644 --- a/pom.xml +++ b/pom.xml @@ -158,7 +158,7 @@ release true clean install - -DskipTests -Dimpsort.skip + -DskipTests -Dformatter.skip -Dimpsort.skip diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/Zulip.java b/src/main/java/com/github/jamesnetherton/zulip/client/Zulip.java index 972082dc..2972b1c2 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/Zulip.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/Zulip.java @@ -3,6 +3,7 @@ import com.github.jamesnetherton.zulip.client.api.core.ZulipService; import com.github.jamesnetherton.zulip.client.api.draft.DraftService; import com.github.jamesnetherton.zulip.client.api.event.EventService; +import com.github.jamesnetherton.zulip.client.api.invitation.InvitationService; import com.github.jamesnetherton.zulip.client.api.message.MessageService; import com.github.jamesnetherton.zulip.client.api.server.ServerService; import com.github.jamesnetherton.zulip.client.api.stream.StreamService; @@ -72,6 +73,17 @@ public Zulip(ZulipConfiguration configuration) throws ZulipClientException { this.client = factory.createZulipHttpClient(configuration); } + /** + * Access the collection of channel Zulip APIs. + *

+ * Since channels are analogous to streams. The {@link StreamService} is returned. + * + * @return The {@link StreamService} Zulip channel APIs + */ + public StreamService channels() { + return streams(); + } + /** * Access the collection of draft Zulip APIs. * @@ -90,6 +102,15 @@ public EventService events() { return (EventService) services.computeIfAbsent(EventService.class, key -> new EventService(this.client)); } + /** + * Access the collection of invitation Zulip APIs. + * + * @return The {@link InvitationService} Zulip event APIs + */ + public InvitationService invitations() { + return (InvitationService) services.computeIfAbsent(InvitationService.class, key -> new InvitationService(this.client)); + } + /** * Access the collection of message Zulip APIs. * diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/event/EventPoller.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/event/EventPoller.java index f1ecb3b6..08c5de99 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/event/EventPoller.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/event/EventPoller.java @@ -26,6 +26,8 @@ public class EventPoller { private final MessageEventListener listener; private final ZulipHttpClient client; private final Narrow[] narrows; + private volatile ExecutorService eventListenerExecutorService; + private volatile boolean userManagedEventListenerExecutorService = false; private volatile EventQueue queue; private volatile ExecutorService executor; private volatile Status status = Status.STOPPED; @@ -44,6 +46,25 @@ public EventPoller(ZulipHttpClient client, MessageEventListener listener, Narrow this.narrows = narrows; } + /** + * Constructs a {@link EventPoller}. + * + * @param client The Zulip HTTP client + * @param listener The {@link MessageEventListener} to be invoked on each message event + * @param narrows optional {@link Narrow} expressions to filter which message events are captured. E.g + * messages from a + * specific stream + * @param eventListenerExecutorService Custom {@link ExecutorService} to use for message event listener execution + */ + public EventPoller(ZulipHttpClient client, MessageEventListener listener, Narrow[] narrows, + ExecutorService eventListenerExecutorService) { + this.client = client; + this.listener = listener; + this.narrows = narrows; + this.eventListenerExecutorService = eventListenerExecutorService; + this.userManagedEventListenerExecutorService = true; + } + /** * Starts event message polling. * @@ -60,6 +81,10 @@ public synchronized void start() throws ZulipClientException { queue = createQueue.execute(); executor = Executors.newSingleThreadExecutor(); + if (eventListenerExecutorService == null) { + eventListenerExecutorService = Executors.newCachedThreadPool(); + } + executor.submit(new Runnable() { private long lastEventId = queue.getLastEventId(); @@ -72,7 +97,7 @@ public void run() { List messageEvents = getEvents.execute(); for (MessageEvent event : messageEvents) { - listener.onEvent(event.getMessage()); + eventListenerExecutorService.submit(() -> listener.onEvent(event.getMessage())); } lastEventId = messageEvents.stream().max(Comparator.comparing(Event::getId)) @@ -111,6 +136,11 @@ public synchronized void stop() { LOG.info("EventPoller stopping"); status = Status.STOPPING; executor.shutdown(); + if (userManagedEventListenerExecutorService) { + eventListenerExecutorService.shutdown(); + eventListenerExecutorService = null; + } + DeleteEventQueueApiRequest deleteQueue = new DeleteEventQueueApiRequest(this.client, queue.getQueueId()); deleteQueue.execute(); } catch (ZulipClientException e) { diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/Invitation.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/Invitation.java new file mode 100644 index 00000000..6f6edd2e --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/Invitation.java @@ -0,0 +1,73 @@ +package com.github.jamesnetherton.zulip.client.api.invitation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.user.UserRole; +import java.time.Instant; + +/** + * Defines a Zulip invitation. + */ +public class Invitation { + @JsonProperty + private long id; + + @JsonProperty + private long invitedByUserId; + + @JsonProperty + private Instant invited; + + @JsonProperty + private Instant expiryDate; + + @JsonProperty + private UserRole invitedAs; + + @JsonProperty + private String email; + + @JsonProperty + private boolean notifyReferrerOnJoin; + + @JsonProperty + private String linkUrl; + + @JsonProperty + private boolean isMultiuse; + + public long getId() { + return id; + } + + public long getInvitedByUserId() { + return invitedByUserId; + } + + public Instant getInvited() { + return invited; + } + + public Instant getExpiryDate() { + return expiryDate; + } + + public UserRole getInvitedAs() { + return invitedAs; + } + + public String getEmail() { + return email; + } + + public boolean isNotifyReferrerOnJoin() { + return notifyReferrerOnJoin; + } + + public String getLinkUrl() { + return linkUrl; + } + + public boolean isMultiuse() { + return isMultiuse; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/InvitationService.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/InvitationService.java new file mode 100644 index 00000000..52ef771d --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/InvitationService.java @@ -0,0 +1,99 @@ +package com.github.jamesnetherton.zulip.client.api.invitation; + +import com.github.jamesnetherton.zulip.client.api.core.ZulipService; +import com.github.jamesnetherton.zulip.client.api.invitation.request.CreateReusableInvitationLinkApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.request.GetAllInvitationsApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.request.ResendEmailInvitationApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.request.RevokeEmailInvitationApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.request.RevokeReusableInvitationApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.request.SendInvitationsApiRequest; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; +import java.util.List; + +/** + * Zulip invitation APIs. + */ +public class InvitationService implements ZulipService { + + private final ZulipHttpClient client; + + /** + * Constructs a {@link InvitationService}. + * + * @param client The Zulip HTTP client + */ + public InvitationService(ZulipHttpClient client) { + this.client = client; + } + + /** + * Creates a new invitation link. + * + * @see https://zulip.com/api/create-invite-link + * + * @return The {@link CreateReusableInvitationLinkApiRequest} builder object + */ + public CreateReusableInvitationLinkApiRequest createReusableInvitationLink() { + return new CreateReusableInvitationLinkApiRequest(client); + } + + /** + * Fetches all unexpired invitations. + * + * @see https://zulip.com/api/get-invites + * + * @return The {@link GetAllInvitationsApiRequest} builder object + */ + public GetAllInvitationsApiRequest getAllInvitations() { + return new GetAllInvitationsApiRequest(client); + } + + /** + * Resends an email invitation. + * + * @see https://zulip.com/api/resend-email-invite + * + * @param invitationId The id of the invitation to resend + * @return The {@link ResendEmailInvitationApiRequest} builder object + */ + public ResendEmailInvitationApiRequest resendEmailInvitation(long invitationId) { + return new ResendEmailInvitationApiRequest(client, invitationId); + } + + /** + * Revokes an email invitation. + * + * @see https://zulip.com/api/revoke-email-invite + * + * @param invitationId The id of the invitation to revoke + * @return The {@link RevokeEmailInvitationApiRequest} builder object + */ + public RevokeEmailInvitationApiRequest revokeEmailInvitation(long invitationId) { + return new RevokeEmailInvitationApiRequest(client, invitationId); + } + + /** + * Revokes a reusable invitation. + * + * @see https://zulip.com/api/revoke-invite-link + * + * @param invitationId The id of the invitation to revoke + * @return The {@link RevokeReusableInvitationApiRequest} builder object + */ + public RevokeReusableInvitationApiRequest revokeReusableInvitation(long invitationId) { + return new RevokeReusableInvitationApiRequest(client, invitationId); + } + + /** + * Send invitations to specified email addresses. + * + * @see https://zulip.com/api/send-invites + * + * @param inviteeEmails The list of email addresses to invite + * @param streamIds The list of channel ids that the newly created user will be automatically subscribed to + * @return The {@link SendInvitationsApiRequest} builder object + */ + public SendInvitationsApiRequest sendInvitations(List inviteeEmails, List streamIds) { + return new SendInvitationsApiRequest(client, inviteeEmails, streamIds); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/CreateReusableInvitationLinkApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/CreateReusableInvitationLinkApiRequest.java new file mode 100644 index 00000000..8472d2c9 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/CreateReusableInvitationLinkApiRequest.java @@ -0,0 +1,101 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.request; + +import static com.github.jamesnetherton.zulip.client.api.invitation.request.InvitationRequestConstants.MULTIUSE_API_PATH; + +import com.github.jamesnetherton.zulip.client.api.core.ExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.response.CreateReusableInvitationLinkApiResponse; +import com.github.jamesnetherton.zulip.client.api.user.UserRole; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for creating a reusable invitation link. + * + * @see https://zulip.com/api/create-invite-link + */ +public class CreateReusableInvitationLinkApiRequest extends ZulipApiRequest implements ExecutableApiRequest { + public static final String INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS = "include_realm_default_subscriptions"; + public static final String INVITE_AS = "invite_as"; + public static final String INVITE_EXPIRES_IN_MINUTES = "invite_expires_in_minutes"; + public static final String STREAM_IDS = "stream_ids"; + + /** + * Constructs a {@link CreateReusableInvitationLinkApiRequest}. + * + * @param client The Zulip HTTP client + */ + public CreateReusableInvitationLinkApiRequest(ZulipHttpClient client) { + super(client); + } + + /** + * Sets whether the newly created user should be subscribed to the default channels for the organization. + * + * @see https://zulip.com/api/create-invite-link#parameter-include_realm_default_subscriptions + * + * @param includeRealmDefaultSubscriptions When {@code true}, the newly created user will be subscribed to the default + * channels for the organization. When {@code false} the user is not subscribed to + * any default channels. + * @return This {@link CreateReusableInvitationLinkApiRequest} instance + */ + public CreateReusableInvitationLinkApiRequest withIncludeRealmDefaultSubscriptions( + boolean includeRealmDefaultSubscriptions) { + putParam(INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS, includeRealmDefaultSubscriptions); + return this; + } + + /** + * Sets the organization level role of the user that is created when the invitation is accepted. + * + * @see https://zulip.com/api/create-invite-link#parameter-invite_as + * + * @param role The {@link UserRole} that should apply to the new user + * @return This {@link CreateReusableInvitationLinkApiRequest} instance + */ + public CreateReusableInvitationLinkApiRequest withInviteAs(UserRole role) { + putParam(INVITE_AS, role.getId()); + return this; + } + + /** + * Sets the number of minutes before the invitation will expire. + * + * @see https://zulip.com/api/create-invite-link#parameter-invite_expires_in_minutes + * + * @param minutes The number of minutes before the invitation will expire + * @return This {@link CreateReusableInvitationLinkApiRequest} instance + */ + public CreateReusableInvitationLinkApiRequest inviteExpiresInMinutes(int minutes) { + putParam(INVITE_EXPIRES_IN_MINUTES, minutes); + return this; + } + + /** + * Sets the list of channel ids that the newly created user will be automatically subscribed to. + * + * @see https://zulip.com/api/create-invite-link#parameter-stream_ids + * + * @param streamIds The ids of channels that the newly created user will be automatically subscribed to + * @return This {@link CreateReusableInvitationLinkApiRequest} instance + */ + public CreateReusableInvitationLinkApiRequest streamIds(long... streamIds) { + putParamAsJsonString(STREAM_IDS, streamIds); + return this; + } + + /** + * Executes the Zulip API request for creating a reusable invitation link. + * + * @return The generated invitation link URL + * @throws ZulipClientException if the request was not successful + */ + @Override + public String execute() throws ZulipClientException { + return client().post(MULTIUSE_API_PATH, getParams(), CreateReusableInvitationLinkApiResponse.class).getInviteLink(); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/GetAllInvitationsApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/GetAllInvitationsApiRequest.java new file mode 100644 index 00000000..5aa22479 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/GetAllInvitationsApiRequest.java @@ -0,0 +1,38 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.request; + +import static com.github.jamesnetherton.zulip.client.api.invitation.request.InvitationRequestConstants.INVITATIONS_API_PATH; + +import com.github.jamesnetherton.zulip.client.api.core.ExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.Invitation; +import com.github.jamesnetherton.zulip.client.api.invitation.response.GetAllInvitationsApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; +import java.util.List; + +/** + * Zulip API request builder for fetching invitations. + * + * @see https://zulip.com/api/get-invites + */ +public class GetAllInvitationsApiRequest extends ZulipApiRequest implements ExecutableApiRequest> { + /** + * Constructs a {@link GetAllInvitationsApiRequest}. + * + * @param client The Zulip HTTP client + */ + public GetAllInvitationsApiRequest(ZulipHttpClient client) { + super(client); + } + + /** + * Executes the Zulip API request for fetching invitations. + * + * @return List of {@link Invitation} containing each unexpired invitation + * @throws ZulipClientException if the request was not successful + */ + @Override + public List execute() throws ZulipClientException { + return client().get(INVITATIONS_API_PATH, getParams(), GetAllInvitationsApiResponse.class).getInvites(); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/InvitationRequestConstants.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/InvitationRequestConstants.java new file mode 100644 index 00000000..f71a7a85 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/InvitationRequestConstants.java @@ -0,0 +1,12 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.request; + +final class InvitationRequestConstants { + final static String INVITATIONS_API_PATH = "invites"; + final static String INVITATIONS_WITH_ID = INVITATIONS_API_PATH + "/%d"; + final static String MULTIUSE_API_PATH = INVITATIONS_API_PATH + "/multiuse"; + final static String MULTIUSE_WITH_ID = MULTIUSE_API_PATH + "/%d"; + final static String RESEND = INVITATIONS_WITH_ID + "/resend"; + + private InvitationRequestConstants() { + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/ResendEmailInvitationApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/ResendEmailInvitationApiRequest.java new file mode 100644 index 00000000..02090068 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/ResendEmailInvitationApiRequest.java @@ -0,0 +1,40 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.request; + +import static com.github.jamesnetherton.zulip.client.api.invitation.request.InvitationRequestConstants.RESEND; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for resending an email invitation. + * + * @see https://zulip.com/api/resend-email-invite + */ +public class ResendEmailInvitationApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + private final long invitationId; + + /** + * Constructs a {@link ResendEmailInvitationApiRequest}. + * + * @param client The Zulip HTTP client + * @param invitationId The id of the invitation to resend + */ + public ResendEmailInvitationApiRequest(ZulipHttpClient client, long invitationId) { + super(client); + this.invitationId = invitationId; + } + + /** + * Executes the Zulip API request for resending an email invitation. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + String path = String.format(RESEND, invitationId); + client().post(path, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/RevokeEmailInvitationApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/RevokeEmailInvitationApiRequest.java new file mode 100644 index 00000000..b2416931 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/RevokeEmailInvitationApiRequest.java @@ -0,0 +1,40 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.request; + +import static com.github.jamesnetherton.zulip.client.api.invitation.request.InvitationRequestConstants.INVITATIONS_WITH_ID; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for revoking an email invitation. + * + * @see https://zulip.com/api/revoke-email-invite + */ +public class RevokeEmailInvitationApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + private final long invitationId; + + /** + * Constructs a {@link RevokeEmailInvitationApiRequest}. + * + * @param client The Zulip HTTP client + * @param invitationId The id of the invitation to revoke + */ + public RevokeEmailInvitationApiRequest(ZulipHttpClient client, long invitationId) { + super(client); + this.invitationId = invitationId; + } + + /** + * Executes the Zulip API request for revoking an email invitation. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + String path = String.format(INVITATIONS_WITH_ID, invitationId); + client().delete(path, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/RevokeReusableInvitationApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/RevokeReusableInvitationApiRequest.java new file mode 100644 index 00000000..0270a298 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/RevokeReusableInvitationApiRequest.java @@ -0,0 +1,40 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.request; + +import static com.github.jamesnetherton.zulip.client.api.invitation.request.InvitationRequestConstants.MULTIUSE_WITH_ID; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for revoking a reusable invitation. + * + * @see https://zulip.com/api/revoke-invite-link + */ +public class RevokeReusableInvitationApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + private final long invitationId; + + /** + * Constructs a {@link RevokeReusableInvitationApiRequest}. + * + * @param client The Zulip HTTP client + * @param invitationId The id of the invitation to revoke + */ + public RevokeReusableInvitationApiRequest(ZulipHttpClient client, long invitationId) { + super(client); + this.invitationId = invitationId; + } + + /** + * Executes the Zulip API request for revoking a reusable invitation. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + String path = String.format(MULTIUSE_WITH_ID, invitationId); + client().delete(path, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/SendInvitationsApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/SendInvitationsApiRequest.java new file mode 100644 index 00000000..d60fea08 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/request/SendInvitationsApiRequest.java @@ -0,0 +1,107 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.request; + +import static com.github.jamesnetherton.zulip.client.api.invitation.request.InvitationRequestConstants.INVITATIONS_API_PATH; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.api.user.UserRole; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; +import java.util.List; + +/** + * Zulip API request builder for sending user invitations. + * + * @see https://zulip.com/api/send-invites + */ +public class SendInvitationsApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + public static final String INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS = "include_realm_default_subscriptions"; + public static final String INVITEE_EMAILS = "invitee_emails"; + public static final String INVITE_AS = "invite_as"; + public static final String INVITE_EXPIRES_IN_MINUTES = "invite_expires_in_minutes"; + public static final String NOTIFIY_REFERRER_ON_JOIN = "notify_referrer_on_join"; + public static final String STREAM_IDS = "stream_ids"; + + /** + * Constructs a {@link SendInvitationsApiRequest}. + * + * @param client The Zulip HTTP client + * @param inviteeEmails The list of email addresses to invite + * @param streamIds The list of channel ids that the newly created user will be automatically subscribed to + */ + public SendInvitationsApiRequest(ZulipHttpClient client, List inviteeEmails, List streamIds) { + super(client); + putParam(INVITEE_EMAILS, String.join(",", inviteeEmails)); + putParamAsJsonString(STREAM_IDS, streamIds.toArray(new Long[0])); + } + + /** + * Sets whether the newly created user should be subscribed to the default channels for the organization. + * + * @see https://zulip.com/api/send-invites#parameter-include_realm_default_subscriptions + * + * @param includeRealmDefaultSubscriptions When {@code true}, the newly created user will be subscribed to the default + * channels for the organization. When {@code false} the user is not subscribed to + * any default channels. + * @return This {@link SendInvitationsApiRequest} instance + */ + public SendInvitationsApiRequest withIncludeRealmDefaultSubscriptions(boolean includeRealmDefaultSubscriptions) { + putParam(INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS, includeRealmDefaultSubscriptions); + return this; + } + + /** + * Sets the organization level role of the user that is created when the invitation is accepted. + * + * @see https://zulip.com/api/send-invites#parameter-invite_as + * + * @param role The {@link UserRole} that should apply to the new user + * @return This {@link SendInvitationsApiRequest} instance + */ + public SendInvitationsApiRequest withInviteAs(UserRole role) { + putParam(INVITE_AS, role.getId()); + return this; + } + + /** + * Sets the number of minutes before the invitation will expire. + * + * @see https://zulip.com/api/send-invites#parameter-invite_expires_in_minutes + * + * @param minutes The number of minutes before the invitation will expire + * @return This {@link SendInvitationsApiRequest} instance + */ + public SendInvitationsApiRequest inviteExpiresInMinutes(int minutes) { + putParam(INVITE_EXPIRES_IN_MINUTES, minutes); + return this; + } + + /** + * Sets whether the referrer would like to receive a direct message from notification bot when a user account is created. + * + * @see https://zulip.com/api/send-invites#parameter-notify_referrer_on_join + * + * @param notifyReferrerOnJoin When {@code true} the referrer will receive a direct message from notification bot when a + * user account is created. When {@code false} no notification is sent + * @return This {@link SendInvitationsApiRequest} instance + */ + public SendInvitationsApiRequest withNotifyReferrerOnJoin(boolean notifyReferrerOnJoin) { + putParam(NOTIFIY_REFERRER_ON_JOIN, notifyReferrerOnJoin); + return this; + } + + /** + * Executes the Zulip API request for sending user invitations. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + client().post(INVITATIONS_API_PATH, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/response/CreateReusableInvitationLinkApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/response/CreateReusableInvitationLinkApiResponse.java new file mode 100644 index 00000000..0f47b55e --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/response/CreateReusableInvitationLinkApiResponse.java @@ -0,0 +1,18 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; + +/** + * Zulip API response class for creating a reusable invitation link. + * + * @see https://zulip.com/api/create-invite-link#response + */ +public class CreateReusableInvitationLinkApiResponse extends ZulipApiResponse { + @JsonProperty + private String inviteLink; + + public String getInviteLink() { + return inviteLink; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/response/GetAllInvitationsApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/response/GetAllInvitationsApiResponse.java new file mode 100644 index 00000000..46a0b434 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/invitation/response/GetAllInvitationsApiResponse.java @@ -0,0 +1,21 @@ +package com.github.jamesnetherton.zulip.client.api.invitation.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.api.invitation.Invitation; +import java.util.ArrayList; +import java.util.List; + +/** + * Zulip API response class for fetching invitations. + * + * @see https://zulip.com/api/get-invites#response + */ +public class GetAllInvitationsApiResponse extends ZulipApiResponse { + @JsonProperty + List invites = new ArrayList<>(); + + public List getInvites() { + return invites; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageService.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageService.java index 6c9a4dbd..da29ebf3 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageService.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageService.java @@ -287,6 +287,34 @@ public RenderMessageApiRequest renderMessage(String content) { return new RenderMessageApiRequest(this.client, content); } + /** + * Sends a channel message to the given channel name and topic. + * + * @see https://zulip.com/api/send-message + * + * @param content The content of the message + * @param channelName The name of the channel to send the message to + * @param topic The name of the message topic + * @return The {@link SendMessageApiRequest} builder object + */ + public SendMessageApiRequest sendChannelMessage(String content, String channelName, String topic) { + return new SendMessageApiRequest(this.client, content, channelName, topic, MessageType.CHANNEL); + } + + /** + * Sends a channel message to the given channel id and topic. + * + * @see https://zulip.com/api/send-message + * + * @param content The content of the message + * @param channelId The id of the stream to send the message to + * @param topic The name of the message topic + * @return The {@link SendMessageApiRequest} builder object + */ + public SendMessageApiRequest sendChannelMessage(String content, long channelId, String topic) { + return new SendMessageApiRequest(this.client, content, channelId, topic, MessageType.CHANNEL); + } + /** * Sends a direct message to the users matching the given email addresses. * @@ -313,36 +341,6 @@ public SendMessageApiRequest sendDirectMessage(String content, long... userIds) return new SendMessageApiRequest(this.client, content, userIds); } - /** - * Sends a private message to the users matching the given email addresses. - * - * @see https://zulip.com/api/send-message - * - * @param content The content of the message - * @param userEmails The email addresses of the users to send the message to - * @return The {@link SendMessageApiRequest} builder object - * @deprecated Use sendDirectMessage instead - */ - @Deprecated(forRemoval = true) - public SendMessageApiRequest sendPrivateMessage(String content, String... userEmails) { - return sendDirectMessage(content, userEmails); - } - - /** - * Sends a private message to the users matching the given email user ids. - * - * @see https://zulip.com/api/send-message - * - * @param content The content of the message - * @param userIds The ids of the users to send the message to - * @return The {@link SendMessageApiRequest} builder object - * @deprecated Use sendDirectMessage instead - */ - @Deprecated(forRemoval = true) - public SendMessageApiRequest sendPrivateMessage(String content, long... userIds) { - return sendDirectMessage(content, userIds); - } - /** * Schedules the sending of a message to a specified stream or users. * diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageType.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageType.java index 41e0dfd1..085e7139 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageType.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/MessageType.java @@ -6,6 +6,10 @@ * Defines the type of Zulip message. */ public enum MessageType { + /** + * The message is a channel message. + */ + CHANNEL, /** * The message is a direct message. */ diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/ReactionType.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/ReactionType.java index febe50ad..7601d7f1 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/ReactionType.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/ReactionType.java @@ -1,5 +1,7 @@ package com.github.jamesnetherton.zulip.client.api.message; +import com.fasterxml.jackson.annotation.JsonCreator; + /** * Defines the Zulip emoji reaction type. */ @@ -17,6 +19,14 @@ public enum ReactionType { */ ZULIP_EXTRA; + @JsonCreator + public static ReactionType fromString(String type) { + if (type == null || type.isEmpty()) { + return ReactionType.UNICODE; + } + return ReactionType.valueOf(type.toUpperCase().replace("_EMOJI", "")); + } + @Override public String toString() { return this.name().toLowerCase() + "_emoji"; diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/FileUploadApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/FileUploadApiRequest.java index de2e0daf..7dff5cbe 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/FileUploadApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/FileUploadApiRequest.java @@ -37,6 +37,9 @@ public FileUploadApiRequest(ZulipHttpClient client, File file) { @Override public String execute() throws ZulipClientException { FileUploadApiResponse response = client().upload(USER_UPLOADS_API_PATH, file, FileUploadApiResponse.class); - return response.getUri(); + if (response.getUri() != null) { + return response.getUri(); + } + return response.getUrl(); } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/SendMessageApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/SendMessageApiRequest.java index d2fae6e5..4030fce3 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/SendMessageApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/request/SendMessageApiRequest.java @@ -90,6 +90,40 @@ public SendMessageApiRequest(ZulipHttpClient client, String content, long stream putParam(TOPIC, topic); } + /** + * Constructs a {@link SendMessageApiRequest} for sending a message to a stream. + * + * @param client The Zulip HTTP client + * @param content The message content + * @param streamName The name of the stream to which the stream should be sent to + * @param topic The name od the topic to post the message under + * @param type The {@link MessageType} for the type of message to send + */ + public SendMessageApiRequest(ZulipHttpClient client, String content, String streamName, String topic, MessageType type) { + super(client); + putParam(CONTENT, content); + putParam(TYPE, type.toString()); + putParam(TO_STREAM, streamName); + putParam(TOPIC, topic); + } + + /** + * Constructs a {@link SendMessageApiRequest}. + * + * @param client The Zulip HTTP client + * @param content The message content + * @param streamId The id of the stream to which the stream should be sent to + * @param topic The name od the topic to post the message under + * @param type The {@link MessageType} for the type of message to send + */ + public SendMessageApiRequest(ZulipHttpClient client, String content, long streamId, String topic, MessageType type) { + super(client); + putParam(CONTENT, content); + putParam(TYPE, type.toString()); + putParam(TO_STREAM, streamId); + putParam(TOPIC, topic); + } + /** * The optional local id associated with the message. * diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/response/FileUploadApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/response/FileUploadApiResponse.java index 9129700d..6142f86a 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/message/response/FileUploadApiResponse.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/message/response/FileUploadApiResponse.java @@ -9,11 +9,19 @@ * @see https://zulip.com/api/get-message-history#response */ public class FileUploadApiResponse extends ZulipApiResponse { - + @Deprecated(since = "0.7", forRemoval = true) @JsonProperty private String uri; + @JsonProperty + private String url; + public String getUri() { return uri; } + + @Deprecated(since = "0.7", forRemoval = true) + public String getUrl() { + return url; + } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ProfileField.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ProfileField.java index 2e44713b..00047997 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ProfileField.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ProfileField.java @@ -35,6 +35,9 @@ public class ProfileField { @JsonProperty private boolean displayInProfileSummary; + @JsonProperty + private boolean required; + @JsonCreator public ProfileField(JsonNode node) { this.hint = node.get("hint").asText(); @@ -42,6 +45,9 @@ public ProfileField(JsonNode node) { this.name = node.get("name").asText(); this.order = node.get("order").asInt(); this.type = ProfileFieldType.fromInt(node.get("type").asInt()); + if (node.has("required")) { + this.required = node.get("required").asBoolean(); + } if (node.has("display_in_profile_summary")) { this.displayInProfileSummary = node.get("display_in_profile_summary").asBoolean(); } @@ -115,4 +121,8 @@ public ProfileFieldType getType() { public boolean isDisplayInProfileSummary() { return displayInProfileSummary; } + + public boolean isRequired() { + return required; + } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerService.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerService.java index 80486ea1..0c7c32d0 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerService.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerService.java @@ -1,8 +1,11 @@ package com.github.jamesnetherton.zulip.client.api.server; import com.github.jamesnetherton.zulip.client.api.core.ZulipService; +import com.github.jamesnetherton.zulip.client.api.server.request.AddApnsDeviceTokenApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.AddCodePlaygroundApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.AddFcmRegistrationTokenApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.AddLinkifierApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.CreateBigBlueButtonVideoCallApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.CreateProfileFieldApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.DeleteLinkifierApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.DeleteProfileFieldApiRequest; @@ -11,9 +14,12 @@ import com.github.jamesnetherton.zulip.client.api.server.request.GetLinkifiersApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.GetProfileFieldsApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.GetServerSettingsApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.RemoveApnsDeviceTokenApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.RemoveCodePlaygroundApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.RemoveFcmRegistrationTokenApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.ReorderLinkifiersApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.ReorderProfileFieldsApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.SendMobilePushTestNotification; import com.github.jamesnetherton.zulip.client.api.server.request.UpdateLinkifierApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.UpdateRealmNewUserDefaultSettingsApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.UploadEmojiApiRequest; @@ -246,4 +252,77 @@ public RemoveCodePlaygroundApiRequest removeCodePlayground(long codePlaygroundId public UpdateRealmNewUserDefaultSettingsApiRequest updateRealmNewUserDefaultSettings() { return new UpdateRealmNewUserDefaultSettingsApiRequest(this.client); } + + /** + * Sends mobile push test notifications. + * + * @see https://zulip.com/api/test-notify + * + * @return The {@link SendMobilePushTestNotification} builder object + */ + public SendMobilePushTestNotification sendMobilePushTestNotification() { + return new SendMobilePushTestNotification(this.client); + } + + /** + * Adds an APNs device token to register for iOS push notifications + * + * @see https://zulip.com/api/add-apns-token + * + * @param token The token provided by the device + * @param appId The ID of the Zulip app that is making the request + * @return The {@link AddApnsDeviceTokenApiRequest} builder object + */ + public AddApnsDeviceTokenApiRequest addApnsDeviceToken(String token, String appId) { + return new AddApnsDeviceTokenApiRequest(this.client, token, appId); + } + + /** + * Removes an APNs device token. + * + * @see https://zulip.com/api/remove-apns-token + * + * @param token The token provided by the device + * @return The {@link RemoveApnsDeviceTokenApiRequest} builder object + */ + public RemoveApnsDeviceTokenApiRequest removeApnsDeviceToken(String token) { + return new RemoveApnsDeviceTokenApiRequest(this.client, token); + } + + /** + * Adds an FCM registration token. + * + * @see https://zulip.com/api/add-fcm-token + * + * @param token The token provided by the device + * @return The {@link AddFcmRegistrationTokenApiRequest} builder object + */ + public AddFcmRegistrationTokenApiRequest addFcmRegsitrationToken(String token) { + return new AddFcmRegistrationTokenApiRequest(this.client, token); + } + + /** + * Removes an FCM registration token. + * + * @see https://zulip.com/api/remove-fcm-token + * + * @param token The token provided by the device + * @return The {@link RemoveFcmRegistrationTokenApiRequest} builder object + */ + public RemoveFcmRegistrationTokenApiRequest removeFcmRegistrationToken(String token) { + return new RemoveFcmRegistrationTokenApiRequest(this.client, token); + } + + /** + * Creates a BigBlueButton video call. + * + * @see https://zulip.com/api/create-big-blue-button-video-call + * + * @param meetingName Meeting name for the BigBlueButton video call + * @return The {@link CreateBigBlueButtonVideoCallApiRequest} builder object + */ + public CreateBigBlueButtonVideoCallApiRequest createBigBlueButtonVideoCall(String meetingName) { + return new CreateBigBlueButtonVideoCallApiRequest(this.client, meetingName); + } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerSettings.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerSettings.java index 9ae6618f..87bbab54 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerSettings.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/ServerSettings.java @@ -46,10 +46,15 @@ public String getRealmName() { return delegate.getRealmName(); } + @Deprecated(since = "0.7.0", forRemoval = true) public String getRealmUri() { return delegate.getRealmUri(); } + public String getRealmUrl() { + return delegate.getRealmUrl(); + } + public boolean isRealmWebPublicAccessEnabled() { return delegate.isRealmWebPublicAccessEnabled(); } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/AddApnsDeviceTokenApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/AddApnsDeviceTokenApiRequest.java new file mode 100644 index 00000000..0a44325b --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/AddApnsDeviceTokenApiRequest.java @@ -0,0 +1,43 @@ +package com.github.jamesnetherton.zulip.client.api.server.request; + +import static com.github.jamesnetherton.zulip.client.api.server.request.ServerRequestConstants.USERS_APNS_DEVICE_TOKEN; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for adding APNs device token to register for iOS push notifications. + * + * @see https://zulip.com/api/add-apns-token + * + */ +public class AddApnsDeviceTokenApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + public static final String APP_ID = "appid"; + public static final String TOKEN = "token"; + + /** + * Constructs a {@link AddApnsDeviceTokenApiRequest}. + * + * @param client The Zulip HTTP client + * @param token The token provided by the device + * @param appId The ID of the Zulip app that is making the request + */ + public AddApnsDeviceTokenApiRequest(ZulipHttpClient client, String token, String appId) { + super(client); + putParam(TOKEN, token); + putParam(APP_ID, appId); + } + + /** + * Executes the Zulip API request for for adding APNs device token to register for iOS push notifications. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + client().post(USERS_APNS_DEVICE_TOKEN, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/AddFcmRegistrationTokenApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/AddFcmRegistrationTokenApiRequest.java new file mode 100644 index 00000000..9751d39e --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/AddFcmRegistrationTokenApiRequest.java @@ -0,0 +1,40 @@ +package com.github.jamesnetherton.zulip.client.api.server.request; + +import static com.github.jamesnetherton.zulip.client.api.server.request.ServerRequestConstants.USERS_ANDROID_GCM_REG_ID; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for adding an FCM registration token. + * + * @see https://zulip.com/api/add-fcm-token + * + */ +public class AddFcmRegistrationTokenApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + public static final String TOKEN = "token"; + + /** + * Constructs a {@link RemoveFcmRegistrationTokenApiRequest}. + * + * @param client The Zulip HTTP client + * @param token The token provided by the device + */ + public AddFcmRegistrationTokenApiRequest(ZulipHttpClient client, String token) { + super(client); + putParam(TOKEN, token); + } + + /** + * Executes the Zulip API request for adding an FCM registration token. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + client().post(USERS_ANDROID_GCM_REG_ID, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/CreateBigBlueButtonVideoCallApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/CreateBigBlueButtonVideoCallApiRequest.java new file mode 100644 index 00000000..294d2d31 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/CreateBigBlueButtonVideoCallApiRequest.java @@ -0,0 +1,42 @@ +package com.github.jamesnetherton.zulip.client.api.server.request; + +import static com.github.jamesnetherton.zulip.client.api.server.request.ServerRequestConstants.CALLS_BIG_BLUE_BUTTON; + +import com.github.jamesnetherton.zulip.client.api.core.ExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.response.CreateBigBlueButtonVideoCallApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for creating a BigBlueButton video call. + * + * @see https://zulip.com/api/create-big-blue-button-video-call + * + */ +public class CreateBigBlueButtonVideoCallApiRequest extends ZulipApiRequest implements ExecutableApiRequest { + public static final String MEETING_NAME = "meeting_name"; + + /** + * Constructs a {@link CreateBigBlueButtonVideoCallApiRequest}. + * + * @param client The Zulip HTTP client + * @param meetingName Meeting name for the BigBlueButton video call + */ + public CreateBigBlueButtonVideoCallApiRequest(ZulipHttpClient client, String meetingName) { + super(client); + putParam(MEETING_NAME, meetingName); + } + + /** + * Executes the Zulip API request for creating a BigBlueButton video call. + * + * @return The URL of the created BigBlueButton video call. + * @throws ZulipClientException if the request was not successful + */ + @Override + public String execute() throws ZulipClientException { + return client().get(CALLS_BIG_BLUE_BUTTON, getParams(), CreateBigBlueButtonVideoCallApiResponse.class).getUrl(); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/CreateProfileFieldApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/CreateProfileFieldApiRequest.java index d3e0c17a..711b4e10 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/CreateProfileFieldApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/CreateProfileFieldApiRequest.java @@ -27,6 +27,7 @@ public class CreateProfileFieldApiRequest extends ZulipApiRequest implements Exe public static final String FIELD_TYPE = "field_type"; public static final String FIELD_DATA = "field_data"; public static final String DISPLAY_IN_PROFILE_SUMMARY = "display_in_profile_summary"; + public static final String REQUIRED = "required"; /** * Constructs a {@link CreateProfileFieldApiRequest}. @@ -109,6 +110,17 @@ public CreateProfileFieldApiRequest withDisplayInProfileSummary(boolean isDispla return this; } + /** + * Sets whether the profile field is required. + * + * @param required Whether the profile field is required + * @return This {@link CreateProfileFieldApiRequest} instance + */ + public CreateProfileFieldApiRequest withRequired(boolean required) { + putParam(REQUIRED, required); + return this; + } + /** * Executes the Zulip API request for creating a custom profile field. * diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/RemoveApnsDeviceTokenApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/RemoveApnsDeviceTokenApiRequest.java new file mode 100644 index 00000000..b8ff6af8 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/RemoveApnsDeviceTokenApiRequest.java @@ -0,0 +1,40 @@ +package com.github.jamesnetherton.zulip.client.api.server.request; + +import static com.github.jamesnetherton.zulip.client.api.server.request.ServerRequestConstants.USERS_APNS_DEVICE_TOKEN; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for removing an APNs device token. + * + * @see https://zulip.com/api/remove-apns-token + * + */ +public class RemoveApnsDeviceTokenApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + public static final String TOKEN = "token"; + + /** + * Constructs a {@link RemoveApnsDeviceTokenApiRequest}. + * + * @param client The Zulip HTTP client + * @param token The token provided by the device + */ + public RemoveApnsDeviceTokenApiRequest(ZulipHttpClient client, String token) { + super(client); + putParam(TOKEN, token); + } + + /** + * Executes the Zulip API request for removing an APNs device token. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + client().delete(USERS_APNS_DEVICE_TOKEN, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/RemoveFcmRegistrationTokenApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/RemoveFcmRegistrationTokenApiRequest.java new file mode 100644 index 00000000..d4f7ff9e --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/RemoveFcmRegistrationTokenApiRequest.java @@ -0,0 +1,40 @@ +package com.github.jamesnetherton.zulip.client.api.server.request; + +import static com.github.jamesnetherton.zulip.client.api.server.request.ServerRequestConstants.USERS_ANDROID_GCM_REG_ID; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for removing an FCM registration token. + * + * @see https://zulip.com/api/remove-fcm-token + * + */ +public class RemoveFcmRegistrationTokenApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + public static final String TOKEN = "token"; + + /** + * Constructs a {@link RemoveFcmRegistrationTokenApiRequest}. + * + * @param client The Zulip HTTP client + * @param token The token provided by the device + */ + public RemoveFcmRegistrationTokenApiRequest(ZulipHttpClient client, String token) { + super(client); + putParam(TOKEN, token); + } + + /** + * Executes the Zulip API request for removing an FCM registration token. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + client().delete(USERS_ANDROID_GCM_REG_ID, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/SendMobilePushTestNotification.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/SendMobilePushTestNotification.java new file mode 100644 index 00000000..085af038 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/SendMobilePushTestNotification.java @@ -0,0 +1,52 @@ +package com.github.jamesnetherton.zulip.client.api.server.request; + +import static com.github.jamesnetherton.zulip.client.api.server.request.ServerRequestConstants.MOBILE_PUSH_TEST; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for sending mobile push test notifications. + * + * @see https://zulip.com/api/test-notify + * + */ +public class SendMobilePushTestNotification extends ZulipApiRequest implements VoidExecutableApiRequest { + public static final String TOKEN = "token"; + + /** + * Constructs a {@link SendMobilePushTestNotification}. + * + * @param client The Zulip HTTP client + */ + public SendMobilePushTestNotification(ZulipHttpClient client) { + super(client); + } + + /** + * The push token for the device to which to send the test notification. + * + * @see https://zulip.com/api/test-notify#parameter-token + * + * @param token The mobile device token + * @return This {@link SendMobilePushTestNotification} instance + */ + public SendMobilePushTestNotification withToken(String token) { + putParam(TOKEN, token); + return this; + } + + /** + * Executes the Zulip API request for sending mobile push test notifications. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + client().post(MOBILE_PUSH_TEST, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/ServerRequestConstants.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/ServerRequestConstants.java index e6d522a7..eb9d73d7 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/ServerRequestConstants.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/ServerRequestConstants.java @@ -1,9 +1,10 @@ package com.github.jamesnetherton.zulip.client.api.server.request; final class ServerRequestConstants { - + public static final String CALLS_BIG_BLUE_BUTTON = "calls/bigbluebutton/create"; public static final String DEV_FETCH_API_KEY = "dev_fetch_api_key"; public static final String FETCH_API_KEY = "fetch_api_key"; + public static final String MOBILE_PUSH_TEST = "mobile_push/test_notification"; public static final String REALM = "realm"; public static final String REALM_EMOJI = REALM + "/emoji"; public static final String REALM_EMOJI_WITH_NAME = REALM_EMOJI + "/%s"; @@ -16,6 +17,9 @@ final class ServerRequestConstants { public static final String REALM_PROFILE_FIELDS_WITH_ID = REALM_PROFILE_FIELDS + "/%d"; public static final String REALM_USER_SETTINGS_DEFAULTS = REALM + "/user_settings_defaults"; public static final String SERVER_SETTINGS = "server_settings"; + public static final String USERS_WITH_ME = "users/me"; + public static final String USERS_APNS_DEVICE_TOKEN = USERS_WITH_ME + "/apns_device_token"; + public static final String USERS_ANDROID_GCM_REG_ID = USERS_WITH_ME + "/android_gcm_reg_id"; private ServerRequestConstants() { } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/UpdateRealmNewUserDefaultSettingsApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/UpdateRealmNewUserDefaultSettingsApiRequest.java index 1166bd19..80b1bf4d 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/UpdateRealmNewUserDefaultSettingsApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/request/UpdateRealmNewUserDefaultSettingsApiRequest.java @@ -16,8 +16,9 @@ import com.github.jamesnetherton.zulip.client.api.user.DesktopIconCountDisplay; import com.github.jamesnetherton.zulip.client.api.user.EmojiSet; import com.github.jamesnetherton.zulip.client.api.user.UserListStyle; +import com.github.jamesnetherton.zulip.client.api.user.WebAnimateImageOption; +import com.github.jamesnetherton.zulip.client.api.user.WebChannelView; import com.github.jamesnetherton.zulip.client.api.user.WebHomeView; -import com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserSettingsApiRequest; import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; import java.util.List; @@ -65,6 +66,7 @@ public class UpdateRealmNewUserDefaultSettingsApiRequest extends ZulipApiRequest public static final String PRESENCE_ENABLED = "presence_enabled"; public static final String REALM_NAME_IN_NOTIFICATIONS = "realm_name_in_notifications"; public static final String REALM_NAME_IN_EMAIL_NOTIFICATIONS_POLICY = "realm_name_in_email_notifications_policy"; + public static final String RECEIVES_TYPING_NOTIFICATIONS = "receives_typing_notifications"; public static final String SEND_PRIVATE_TYPING_NOTIFICATIONS = "send_private_typing_notifications"; public static final String SEND_READ_RECEIPTS = "send_read_receipts"; public static final String SEND_STREAM_TYPING_NOTIFICATIONS = "send_stream_typing_notifications"; @@ -72,8 +74,13 @@ public class UpdateRealmNewUserDefaultSettingsApiRequest extends ZulipApiRequest public static final String TRANSLATE_EMOTICONS = "translate_emoticons"; public static final String TWENTY_FOUR_HOUR_TIME = "twenty_four_hour_time"; public static final String USER_LIST_STYLE = "user_list_style"; + public static final String WEB_ANIMATE_IMAGE_PREVIEWS = "web_animate_image_previews"; + public static final String WEB_CHANNEL_DEFAULT_VIEW = "web_channel_default_view"; public static final String WEB_ESCAPE_NAVIGATES_TO_HOME_VIEW = "web_escape_navigates_to_home_view"; + public static final String WEB_FONT_SIZE_PX = "web_font_size_px"; + public static final String WEB_LINE_HEIGHT_PERCENT = "web_line_height_percent"; public static final String WEB_MARK_READ_ON_SCROLL_POLICY = "web_mark_read_on_scroll_policy"; + public static final String WEB_NAVIGATE_TO_SENT_MESSAGE = "web_navigate_to_sent_message"; public static final String WEB_HOME_VIEW = "web_home_view"; public static final String WEB_STREAM_UNREADS_COUNT_DISPLAY_POLICY = "web_stream_unreads_count_display_policy"; public static final String WILDCARD_MENTIONS_NOTIFY = "wildcard_mentions_notify"; @@ -527,7 +534,7 @@ public UpdateRealmNewUserDefaultSettingsApiRequest withRealmNameInNotifications( * * @param policy The {@link RealmNameInNotificationsPolicy} to determine whether to include the organization name in the * subject of message notification emails - * @return This {@link UpdateOwnUserSettingsApiRequest} instance + * @return This {@link UpdateRealmNewUserDefaultSettingsApiRequest} instance */ public UpdateRealmNewUserDefaultSettingsApiRequest withRealmNameInEmailNotifications( RealmNameInNotificationsPolicy policy) { @@ -535,6 +542,18 @@ public UpdateRealmNewUserDefaultSettingsApiRequest withRealmNameInEmailNotificat return this; } + /** + * Sets whether the user is configured to receive typing notifications from other users. + * + * @param receivesTypingNotifications {@code} true to receive typing notifications from other users. {@code false} to not + * receive typing notifications from other users. + * @return This {@link UpdateRealmNewUserDefaultSettingsApiRequest} instance + */ + public UpdateRealmNewUserDefaultSettingsApiRequest withReceivesTypingNotifications(boolean receivesTypingNotifications) { + putParam(RECEIVES_TYPING_NOTIFICATIONS, receivesTypingNotifications); + return this; + } + /** * Sets whether typing notifications be sent when composing private messages. * @@ -633,6 +652,51 @@ public UpdateRealmNewUserDefaultSettingsApiRequest withUserListStyle(UserListSty return this; } + /** + * Sets how animated images should be played in the message feed. + * + * @param webAnimateImageOption The option determining how animated images should be played + * @return This {@link UpdateRealmNewUserDefaultSettingsApiRequest} instance + */ + public UpdateRealmNewUserDefaultSettingsApiRequest withWebAnimateImagePreviews( + WebAnimateImageOption webAnimateImageOption) { + putParam(WEB_ANIMATE_IMAGE_PREVIEWS, webAnimateImageOption.toString()); + return this; + } + + /** + * Sets the default navigation behavior when clicking on a channel link. + * + * @param webChannelView for the default channel view + * @return This {@link UpdateRealmNewUserDefaultSettingsApiRequest} instance + */ + public UpdateRealmNewUserDefaultSettingsApiRequest withWebChannelDefaultView(WebChannelView webChannelView) { + putParam(WEB_CHANNEL_DEFAULT_VIEW, webChannelView.getId()); + return this; + } + + /** + * Sets the user primary font size in pixels. + * + * @param fontSize The size of the font used on the Zulip web UI + * @return This {@link UpdateRealmNewUserDefaultSettingsApiRequest} instance + */ + public UpdateRealmNewUserDefaultSettingsApiRequest withWebFontPx(int fontSize) { + putParam(WEB_FONT_SIZE_PX, fontSize); + return this; + } + + /** + * Sets the user primary line height for the Zulip web UI in percent. + * + * @param webLineHeightPercent The line height percentage value + * @return This {@link UpdateRealmNewUserDefaultSettingsApiRequest} instance + */ + public UpdateRealmNewUserDefaultSettingsApiRequest withWebLineHeightPercent(int webLineHeightPercent) { + putParam(WEB_LINE_HEIGHT_PERCENT, webLineHeightPercent); + return this; + } + /** * Sets whether or not to mark messages as read when the user scrolls through their feed. * @@ -644,6 +708,18 @@ public UpdateRealmNewUserDefaultSettingsApiRequest withWebMarkReadOnScrollPolicy return this; } + /** + * Sets whether the user view should automatically go to the conversation where they sent a message. + * + * @param webNavigateToSentMessage {@code trye} to automatically go to the conversation where they sent a message. + * {@code false} to not automatically go to the conversation where they sent a message. + * @return This {@link UpdateRealmNewUserDefaultSettingsApiRequest} instance + */ + public UpdateRealmNewUserDefaultSettingsApiRequest withWebNavigateToSentMessage(boolean webNavigateToSentMessage) { + putParam(WEB_NAVIGATE_TO_SENT_MESSAGE, webNavigateToSentMessage); + return this; + } + /** * Sets which streams should be displayed with a numeric unread count in the left sidebar in the Zulip UI. * diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/response/CreateBigBlueButtonVideoCallApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/response/CreateBigBlueButtonVideoCallApiResponse.java new file mode 100644 index 00000000..fa083e91 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/response/CreateBigBlueButtonVideoCallApiResponse.java @@ -0,0 +1,19 @@ +package com.github.jamesnetherton.zulip.client.api.server.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; + +/** + * Zulip API response class for creating a BigBlueButton video call. + * + * @see https://zulip.com/api/create-big-blue-button-video-call#response + */ +public class CreateBigBlueButtonVideoCallApiResponse extends ZulipApiResponse { + @JsonProperty + private String url; + + public String getUrl() { + return url; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/response/GetServerSettingsApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/response/GetServerSettingsApiResponse.java index f4532a0f..c4ba5700 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/server/response/GetServerSettingsApiResponse.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/server/response/GetServerSettingsApiResponse.java @@ -38,9 +38,13 @@ public class GetServerSettingsApiResponse extends ZulipApiResponse { @JsonProperty private String realmName; + @Deprecated(since = "0.7.0", forRemoval = true) @JsonProperty private String realmUri; + @JsonProperty + private String realmUrl; + @JsonProperty private boolean realmWebPublicAccessEnabled; @@ -85,10 +89,16 @@ public String getRealmName() { return realmName; } + @Deprecated(since = "0.7.0", forRemoval = true) + @JsonProperty public String getRealmUri() { return realmUri; } + public String getRealmUrl() { + return realmUrl; + } + public boolean isRealmWebPublicAccessEnabled() { return realmWebPublicAccessEnabled; } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/Stream.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/Stream.java index 54ec8407..0969792f 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/Stream.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/Stream.java @@ -14,6 +14,9 @@ public class Stream { @JsonProperty private Instant dateCreated; + @JsonProperty + private long creatorId; + @JsonProperty private boolean isDefault; @@ -57,6 +60,10 @@ public boolean isAnnouncementOnly() { return isAnnouncementOnly; } + public long getCreatorId() { + return creatorId; + } + public Instant getDateCreated() { return dateCreated; } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/StreamSubscription.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/StreamSubscription.java index ef50afba..4c596227 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/StreamSubscription.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/StreamSubscription.java @@ -15,6 +15,9 @@ public class StreamSubscription { @JsonProperty private String color; + @JsonProperty + private long creatorId; + @JsonProperty private Instant dateCreated; @@ -80,6 +83,10 @@ public String getColor() { return color; } + public long getCreatorId() { + return creatorId; + } + public Instant getDateCreated() { return dateCreated; } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/request/DeleteTopicApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/request/DeleteTopicApiRequest.java index 6ea11bab..9bb208e6 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/request/DeleteTopicApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/request/DeleteTopicApiRequest.java @@ -4,7 +4,7 @@ import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; -import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.api.stream.response.DeleteTopicApiResponse; import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; @@ -38,9 +38,12 @@ public DeleteTopicApiRequest(ZulipHttpClient client, long streamId, String topic */ @Override public void execute() throws ZulipClientException { - ZulipApiResponse response = null; + DeleteTopicApiResponse response = null; while (response == null || response.isPartiallyCompleted()) { - response = client().post(this.path, getParams(), ZulipApiResponse.class); + response = client().post(this.path, getParams(), DeleteTopicApiResponse.class); + } + while (!response.isComplete()) { + response = client().post(this.path, getParams(), DeleteTopicApiResponse.class); } } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/response/DeleteTopicApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/response/DeleteTopicApiResponse.java new file mode 100644 index 00000000..f656ae5b --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/stream/response/DeleteTopicApiResponse.java @@ -0,0 +1,18 @@ +package com.github.jamesnetherton.zulip.client.api.stream.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; + +/** + * Zulip API response class for deleting a topic. + * + * @see https://zulip.com/api/delete-topic#response + */ +public class DeleteTopicApiResponse extends ZulipApiResponse { + @JsonProperty + boolean complete; + + public boolean isComplete() { + return complete; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserPresenceDetail.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserPresenceDetail.java index 70a8bb68..f0ec974e 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserPresenceDetail.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserPresenceDetail.java @@ -7,6 +7,8 @@ * Defines details about Zulip user presence. */ public class UserPresenceDetail { + @JsonProperty + private String client; @JsonProperty private UserPresenceStatus status; @@ -14,6 +16,19 @@ public class UserPresenceDetail { @JsonProperty private Instant timestamp; + @JsonProperty + private Instant activeTimestamp; + + @JsonProperty + private Instant idleTimestamp; + + @JsonProperty + private boolean pushable; + + public String getClient() { + return client; + } + public UserPresenceStatus getStatus() { return status; } @@ -21,4 +36,16 @@ public UserPresenceStatus getStatus() { public Instant getTimestamp() { return timestamp; } + + public Instant getActiveTimestamp() { + return activeTimestamp; + } + + public Instant getIdleTimestamp() { + return idleTimestamp; + } + + public boolean isPushable() { + return pushable; + } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserRole.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserRole.java index 69065cd4..60652b9a 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserRole.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserRole.java @@ -1,5 +1,7 @@ package com.github.jamesnetherton.zulip.client.api.user; +import com.fasterxml.jackson.annotation.JsonCreator; + /** * Defines Zulip user roles. */ @@ -23,7 +25,11 @@ public enum UserRole { /** * Guest role. */ - GUEST(600); + GUEST(600), + /** + * Unknown role. + */ + UNKNOWN(999); private final int id; @@ -34,4 +40,14 @@ public enum UserRole { public int getId() { return id; } + + @JsonCreator + public static UserRole fromInt(int userRole) { + for (UserRole role : UserRole.values()) { + if (role.getId() == userRole) { + return role; + } + } + return UNKNOWN; + } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserService.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserService.java index ca05917c..65cf5ef8 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserService.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserService.java @@ -7,8 +7,10 @@ import com.github.jamesnetherton.zulip.client.api.user.request.CreateUserGroupApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.DeactivateOwnUserApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.DeactivateUserApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.request.DeleteUserAttachmentApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.DeleteUserGroupApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.GetAllAlertWordsApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.request.GetAllUserPresenceApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.GetAllUsersApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.GetOwnUserApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.GetSubGroupsOfUserGroupApiRequest; @@ -18,6 +20,7 @@ import com.github.jamesnetherton.zulip.client.api.user.request.GetUserGroupMembershipStatusApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.GetUserGroupsApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.GetUserPresenceApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.request.GetUserStatusApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.MuteUserApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.ReactivateUserApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.RemoveAlertWordsApiRequest; @@ -25,6 +28,7 @@ import com.github.jamesnetherton.zulip.client.api.user.request.SetTypingStatusApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UnmuteUserApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateNotificationSettingsApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserPresenceApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserSettingsApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserStatusApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateUserApiRequest; @@ -325,6 +329,29 @@ public GetUserPresenceApiRequest getUserPresence(String email) { return new GetUserPresenceApiRequest(this.client, email); } + /** + * Gets all user presence details. + * + * @see https://zulip.com/api/get-presence + * + * @return The {@link GetAllUserPresenceApiRequest} builder object + */ + public GetAllUserPresenceApiRequest getAllUserPresence() { + return new GetAllUserPresenceApiRequest(this.client); + } + + /** + * Fetches presence details for the current client user. + * + * @see https://zulip.com/api/update-presence + * + * @param status The status of the user + * @return The {@link UpdateOwnUserPresenceApiRequest} builder object + */ + public UpdateOwnUserPresenceApiRequest updateOwnUserPresence(UserPresenceStatus status) { + return new UpdateOwnUserPresenceApiRequest(this.client, status); + } + /** * Get user attachments. * @@ -336,6 +363,18 @@ public GetUserAttachmentsApiRequest getUserAttachments() { return new GetUserAttachmentsApiRequest(this.client); } + /** + * Deletes an attachment. + * + * @see https://zulip.com/api/remove-attachment + * + * @param attachmentId The id of the attachment to delete + * @return The {@link DeleteUserAttachmentApiRequest} builder object + */ + public DeleteUserAttachmentApiRequest deleteAttachment(long attachmentId) { + return new DeleteUserAttachmentApiRequest(this.client, attachmentId); + } + /** * Mute a user. * @@ -445,4 +484,16 @@ public GetAllAlertWordsApiRequest getAllAlertWords() { public RemoveAlertWordsApiRequest removeAlertWords(String... alertWords) { return new RemoveAlertWordsApiRequest(this.client, alertWords); } + + /** + * Gets a user status. + * + * @see https://zulip.com/api/get-user-status + * + * @param userId The ID of the user to fetch the status for + * @return The {@link GetUserStatusApiRequest} builder object + */ + public GetUserStatusApiRequest getUserStatus(long userId) { + return new GetUserStatusApiRequest(this.client, userId); + } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserStatus.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserStatus.java new file mode 100644 index 00000000..8db34d57 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/UserStatus.java @@ -0,0 +1,41 @@ +package com.github.jamesnetherton.zulip.client.api.user; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.message.ReactionType; + +public class UserStatus { + @JsonProperty + private boolean away; + + @JsonProperty + private String statusText; + + @JsonProperty + private String emojiName; + + @JsonProperty + private String emojiCode; + + @JsonProperty + ReactionType reactionType; + + public boolean isAway() { + return away; + } + + public String getStatusText() { + return statusText; + } + + public String getEmojiName() { + return emojiName; + } + + public String getEmojiCode() { + return emojiCode; + } + + public ReactionType getReactionType() { + return reactionType; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/WebAnimateImageOption.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/WebAnimateImageOption.java new file mode 100644 index 00000000..a79dd9f3 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/WebAnimateImageOption.java @@ -0,0 +1,19 @@ +package com.github.jamesnetherton.zulip.client.api.user; + +import com.fasterxml.jackson.annotation.JsonCreator; + +public enum WebAnimateImageOption { + ALWAYS, + NEVER, + ON_HOVER; + + @Override + public String toString() { + return this.name().toLowerCase(); + } + + @JsonCreator + public static WebAnimateImageOption fromString(String option) { + return WebAnimateImageOption.valueOf(option.toUpperCase()); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/WebChannelView.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/WebChannelView.java new file mode 100644 index 00000000..50a3888b --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/WebChannelView.java @@ -0,0 +1,37 @@ +package com.github.jamesnetherton.zulip.client.api.user; + +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + * Setting for controlling the default navigation behavior when clicking on a channel link + */ +public enum WebChannelView { + /** + * Top topic in the channel + */ + CHANNEL_TOP_TOPIC(1), + /** + * Channel feed + */ + CHANNEL_FEED(2); + + private final int id; + + WebChannelView(int id) { + this.id = id; + } + + public int getId() { + return id; + } + + @JsonCreator + public static WebChannelView fromInt(int id) { + for (WebChannelView webChannelView : WebChannelView.values()) { + if (webChannelView.getId() == id) { + return webChannelView; + } + } + return null; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/DeleteUserAttachmentApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/DeleteUserAttachmentApiRequest.java new file mode 100644 index 00000000..d02d185d --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/DeleteUserAttachmentApiRequest.java @@ -0,0 +1,38 @@ +package com.github.jamesnetherton.zulip.client.api.user.request; + +import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for deleting an attachment. + * + * @see https://zulip.com/api/remove-attachment + */ +public class DeleteUserAttachmentApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest { + private final long attachmentId; + + /** + * Constructs a {@link DeleteUserAttachmentApiRequest}. + * + * @param client The Zulip HTTP client + * @param attachmentId The id of the attachment to delete + */ + public DeleteUserAttachmentApiRequest(ZulipHttpClient client, long attachmentId) { + super(client); + this.attachmentId = attachmentId; + } + + /** + * Executes the Zulip API request for deleting an attachment. + * + * @throws ZulipClientException if the request was not successful + */ + @Override + public void execute() throws ZulipClientException { + String attachmentsWithId = String.format(UserRequestConstants.ATTACHMENTS_WITH_ID, attachmentId); + client().delete(attachmentsWithId, getParams(), ZulipApiResponse.class); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/GetAllUserPresenceApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/GetAllUserPresenceApiRequest.java new file mode 100644 index 00000000..1313623d --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/GetAllUserPresenceApiRequest.java @@ -0,0 +1,39 @@ +package com.github.jamesnetherton.zulip.client.api.user.request; + +import static com.github.jamesnetherton.zulip.client.api.user.request.UserRequestConstants.USERS_REALM_PRESENCE; + +import com.github.jamesnetherton.zulip.client.api.core.ExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.UserPresenceDetail; +import com.github.jamesnetherton.zulip.client.api.user.response.GetAllUserPresenceApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; +import java.util.Map; + +/** + * Zulip API request builder for getting all user presence. + * + * @see https://zulip.com/api/get-presence + */ +public class GetAllUserPresenceApiRequest extends ZulipApiRequest + implements ExecutableApiRequest>> { + /** + * Constructs a {@link GetAllUserPresenceApiRequest}. + * + * @param client The Zulip HTTP client + */ + public GetAllUserPresenceApiRequest(ZulipHttpClient client) { + super(client); + } + + /** + * Executes the Zulip API request for getting all user presence. + * + * @return Map of user presence details keyed bu user id or email address + * @throws ZulipClientException if the request was not successful + */ + @Override + public Map> execute() throws ZulipClientException { + return client().get(USERS_REALM_PRESENCE, getParams(), GetAllUserPresenceApiResponse.class).getPresences(); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/GetUserStatusApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/GetUserStatusApiRequest.java new file mode 100644 index 00000000..335e9ff1 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/GetUserStatusApiRequest.java @@ -0,0 +1,42 @@ +package com.github.jamesnetherton.zulip.client.api.user.request; + +import static com.github.jamesnetherton.zulip.client.api.user.request.UserRequestConstants.USERS_STATUS; + +import com.github.jamesnetherton.zulip.client.api.core.ExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.UserStatus; +import com.github.jamesnetherton.zulip.client.api.user.response.GetUserStatusApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; + +/** + * Zulip API request builder for getting a user status. + * + * @see https://zulip.com/api/get-user-status + */ +public class GetUserStatusApiRequest extends ZulipApiRequest implements ExecutableApiRequest { + + private final String path; + + /** + * Constructs a {@link GetUserStatusApiRequest}. + * + * @param client The Zulip HTTP client + * @param userId The ID of the user to fetch the status for + */ + public GetUserStatusApiRequest(ZulipHttpClient client, long userId) { + super(client); + this.path = String.format(USERS_STATUS, userId); + } + + /** + * Executes the Zulip API request for getting a user status. + * + * @return {@link UserStatus} representing the status of the user + * @throws ZulipClientException if the request was not successful + */ + @Override + public UserStatus execute() throws ZulipClientException { + return client().get(this.path, getParams(), GetUserStatusApiResponse.class).getStatus(); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserPresenceApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserPresenceApiRequest.java new file mode 100644 index 00000000..d623bd46 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserPresenceApiRequest.java @@ -0,0 +1,94 @@ +package com.github.jamesnetherton.zulip.client.api.user.request; + +import static com.github.jamesnetherton.zulip.client.api.user.request.UserRequestConstants.USERS_WITH_ME_PRESENCE; + +import com.github.jamesnetherton.zulip.client.api.core.ExecutableApiRequest; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.UserPresenceDetail; +import com.github.jamesnetherton.zulip.client.api.user.UserPresenceStatus; +import com.github.jamesnetherton.zulip.client.api.user.response.UpdateOwnUserPresenceApiResponse; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; +import java.util.Map; + +/** + * Zulip API request builder for updating own user presence. + * + * @see https://zulip.com/api/update-presence + */ +public class UpdateOwnUserPresenceApiRequest extends ZulipApiRequest + implements ExecutableApiRequest> { + public static final String LAST_UPDATE_ID = "last_update_id"; + public static final String NEW_USER_INPUT = "new_user_input"; + public static final String PING_ONLY = "ping_only"; + public static final String STATUS = "status"; + + /** + * Constructs a {@link UpdateOwnUserPresenceApiRequest}. + * + * @param client The Zulip HTTP client + * @param status The status of the user + */ + public UpdateOwnUserPresenceApiRequest(ZulipHttpClient client, UserPresenceStatus status) { + super(client); + if (!status.equals(UserPresenceStatus.ACTIVE) && !status.equals(UserPresenceStatus.IDLE)) { + throw new IllegalArgumentException("Status must be one of ACTIVE or IDLE"); + } + + putParam(STATUS, status.name().toLowerCase()); + putParam(LAST_UPDATE_ID, -1); + } + + /** + * Sets the identifier that specifies what presence data the client already has received. + * + * @see https://zulip.com/api/update-presence#parameter-last_update_id + * + * @param lastUpdateId The identifier that specifies what presence data the client already has received + * @return This {@link UpdateOwnUserPresenceApiRequest} instance + */ + public UpdateOwnUserPresenceApiRequest withLastUpdateId(int lastUpdateId) { + putParam(LAST_UPDATE_ID, lastUpdateId); + return this; + } + + /** + * Sets whether new user interaction has occurred. + * + * @see https://zulip.com/api/update-presence#parameter-new_user_input + * + * @param newUserInput whether new user interaction has occurred + * @return This {@link UpdateOwnUserPresenceApiRequest} instance + */ + public UpdateOwnUserPresenceApiRequest withNewUserInput(boolean newUserInput) { + putParam(NEW_USER_INPUT, newUserInput); + return this; + } + + /** + * Sets whether the client is sending a ping-only request. + * + * @see https://zulip.com/api/update-presence#parameter-ping_only + * + * @param pingOnly whether this is ping-only request + * @return This {@link UpdateOwnUserPresenceApiRequest} instance + */ + public UpdateOwnUserPresenceApiRequest withPingOnly(boolean pingOnly) { + putParam(PING_ONLY, pingOnly); + return this; + } + + /** + * Executes the Zulip API request for updating own user presence. + * + * @return Map of {@link UserPresenceDetail} keyed by user id + * @throws ZulipClientException if the request was not successful + */ + @Override + public Map execute() throws ZulipClientException { + return client().post(USERS_WITH_ME_PRESENCE, getParams(), UpdateOwnUserPresenceApiResponse.class).getPresences(); + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserSettingsApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserSettingsApiRequest.java index 8b8e0b38..68941c40 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserSettingsApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserSettingsApiRequest.java @@ -11,6 +11,8 @@ import com.github.jamesnetherton.zulip.client.api.user.DesktopIconCountDisplay; import com.github.jamesnetherton.zulip.client.api.user.EmojiSet; import com.github.jamesnetherton.zulip.client.api.user.UserListStyle; +import com.github.jamesnetherton.zulip.client.api.user.WebAnimateImageOption; +import com.github.jamesnetherton.zulip.client.api.user.WebChannelView; import com.github.jamesnetherton.zulip.client.api.user.WebHomeView; import com.github.jamesnetherton.zulip.client.api.user.response.UpdateOwnUserSettingsApiResponse; import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; @@ -59,6 +61,7 @@ public class UpdateOwnUserSettingsApiRequest extends ZulipApiRequest implements public static final String PRESENCE_ENABLED = "presence_enabled"; public static final String REALM_NAME_IN_NOTIFICATIONS = "realm_name_in_notifications"; public static final String REALM_NAME_IN_EMAIL_NOTIFICATIONS_POLICY = "realm_name_in_email_notifications_policy"; + public static final String RECEIVES_TYPING_NOTIFICATIONS = "receives_typing_notifications"; public static final String SEND_PRIVATE_TYPING_NOTIFICATIONS = "send_private_typing_notifications"; public static final String SEND_READ_RECEIPTS = "send_read_receipts"; public static final String SEND_STREAM_TYPING_NOTIFICATIONS = "send_stream_typing_notifications"; @@ -67,7 +70,12 @@ public class UpdateOwnUserSettingsApiRequest extends ZulipApiRequest implements public static final String TRANSLATE_EMOTICONS = "translate_emoticons"; public static final String TWENTY_FOUR_HOUR_TIME = "twenty_four_hour_time"; public static final String USER_LIST_STYLE = "user_list_style"; + public static final String WEB_ANIMATE_IMAGE_PREVIEWS = "web_animate_image_previews"; + public static final String WEB_CHANNEL_DEFAULT_VIEW = "web_channel_default_view"; + public static final String WEB_FONT_SIZE_PX = "web_font_size_px"; + public static final String WEB_LINE_HEIGHT_PERCENT = "web_line_height_percent"; public static final String WEB_MARK_READ_ON_SCROLL_POLICY = "web_mark_read_on_scroll_policy"; + public static final String WEB_NAVIGATE_TO_SENT_MESSAGE = "web_navigate_to_sent_message"; public static final String WILDCARD_MENTIONS_NOTIFY = "wildcard_mentions_notify"; /** @@ -504,6 +512,18 @@ public UpdateOwnUserSettingsApiRequest withRealmNameInEmailNotifications(RealmNa return this; } + /** + * Sets whether the user is configured to receive typing notifications from other users. + * + * @param receivesTypingNotifications {@code} true to receive typing notifications from other users. {@code false} to not + * receive typing notifications from other users. + * @return This {@link UpdateOwnUserSettingsApiRequest} instance + */ + public UpdateOwnUserSettingsApiRequest withReceivesTypingNotifications(boolean receivesTypingNotifications) { + putParam(RECEIVES_TYPING_NOTIFICATIONS, receivesTypingNotifications); + return this; + } + /** * Sets whether typing notifications be sent when composing private messages. * @@ -616,7 +636,51 @@ public UpdateOwnUserSettingsApiRequest withUserListStyle(UserListStyle userListS } /** - * Sets whether or not to mark messages as read when the user scrolls through their feed. + * Sets how animated images should be played in the message feed. + * + * @param webAnimateImageOption The option determining how animated images should be played + * @return This {@link UpdateOwnUserSettingsApiRequest} instance + */ + public UpdateOwnUserSettingsApiRequest withWebAnimateImagePreviews(WebAnimateImageOption webAnimateImageOption) { + putParam(WEB_ANIMATE_IMAGE_PREVIEWS, webAnimateImageOption.toString()); + return this; + } + + /** + * Sets the default navigation behavior when clicking on a channel link. + * + * @param webChannelView for the default channel view + * @return This {@link UpdateOwnUserSettingsApiRequest} instance + */ + public UpdateOwnUserSettingsApiRequest withWebChannelDefaultView(WebChannelView webChannelView) { + putParam(WEB_CHANNEL_DEFAULT_VIEW, webChannelView.getId()); + return this; + } + + /** + * Sets the user primary font size in pixels. + * + * @param fontSize The size of the font used on the Zulip web UI + * @return This {@link UpdateOwnUserSettingsApiRequest} instance + */ + public UpdateOwnUserSettingsApiRequest withWebFontPx(int fontSize) { + putParam(WEB_FONT_SIZE_PX, fontSize); + return this; + } + + /** + * Sets the user primary line height for the Zulip web UI in percent. + * + * @param webLineHeightPercent The line height percentage value + * @return This {@link UpdateOwnUserSettingsApiRequest} instance + */ + public UpdateOwnUserSettingsApiRequest withWebLineHeightPercent(int webLineHeightPercent) { + putParam(WEB_LINE_HEIGHT_PERCENT, webLineHeightPercent); + return this; + } + + /** + * Sets whether to mark messages as read when the user scrolls through their feed. * * @param policy The {@link MarkReadOnScrollPolicy} to determine whether when messages are marked as read * @return This {@link UpdateOwnUserSettingsApiRequest} instance @@ -626,6 +690,18 @@ public UpdateOwnUserSettingsApiRequest withWebMarkReadOnScrollPolicy(MarkReadOnS return this; } + /** + * Sets whether the user view should automatically go to the conversation where they sent a message. + * + * @param webNavigateToSentMessage {@code trye} to automatically go to the conversation where they sent a message. + * {@code false} to not automatically go to the conversation where they sent a message. + * @return This {@link UpdateOwnUserSettingsApiRequest} instance + */ + public UpdateOwnUserSettingsApiRequest withWebNavigateToSentMessage(boolean webNavigateToSentMessage) { + putParam(WEB_NAVIGATE_TO_SENT_MESSAGE, webNavigateToSentMessage); + return this; + } + /** * Sets whether to be notified when wildcard mentions are triggered. * @@ -638,6 +714,12 @@ public UpdateOwnUserSettingsApiRequest withWildcardMentionsNotify(boolean wildca return this; } + /** + * Executes the Zulip API request for updating own user settings. + * + * @return List of settings that were ignored + * @throws ZulipClientException if the request was not successful + */ @Override public List execute() throws ZulipClientException { UpdateOwnUserSettingsApiResponse result = client().patch(SETTINGS, getParams(), UpdateOwnUserSettingsApiResponse.class); diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserStatusApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserStatusApiRequest.java index 1b8194ae..47b204c8 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserStatusApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateOwnUserStatusApiRequest.java @@ -1,6 +1,6 @@ package com.github.jamesnetherton.zulip.client.api.user.request; -import static com.github.jamesnetherton.zulip.client.api.user.request.UserRequestConstants.USERS_STATUS; +import static com.github.jamesnetherton.zulip.client.api.user.request.UserRequestConstants.USERS_OWN_STATUS; import com.github.jamesnetherton.zulip.client.api.core.VoidExecutableApiRequest; import com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest; @@ -99,6 +99,6 @@ public UpdateOwnUserStatusApiRequest withStatusText(String statusText) { */ @Override public void execute() throws ZulipClientException { - client().post(USERS_STATUS, getParams(), ZulipApiResponse.class); + client().post(USERS_OWN_STATUS, getParams(), ZulipApiResponse.class); } } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateUserGroupApiRequest.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateUserGroupApiRequest.java index c6f67297..f14cfec5 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateUserGroupApiRequest.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UpdateUserGroupApiRequest.java @@ -7,6 +7,7 @@ import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; import com.github.jamesnetherton.zulip.client.http.ZulipHttpClient; +import java.util.Map; /** * Zulip API request builder for updating a user group. @@ -72,11 +73,13 @@ public UpdateUserGroupApiRequest withName(String name) { /** * Sets the optional ID of the user group whose members are allowed to mention the new user group. * - * @param groupId The ID of the user group whose members are allowed to mention the new user group - * @return This {@link UpdateUserGroupApiRequest} instance + * @param oldGroupId The current ID of the user group whose members are allowed to mention the new user group + * @param newGroupId The new ID of the user group whose members are allowed to mention the new user group + * @return This {@link UpdateUserGroupApiRequest} instance */ - public UpdateUserGroupApiRequest withCanMentionGroup(long groupId) { - putParam(CAN_MENTION_GROUP, groupId); + public UpdateUserGroupApiRequest withCanMentionGroup(long oldGroupId, long newGroupId) { + Map canMentionGroup = Map.of("old", oldGroupId, "new", newGroupId); + putParamAsJsonString(CAN_MENTION_GROUP, canMentionGroup); return this; } diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UserRequestConstants.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UserRequestConstants.java index be8254f0..78a0a456 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UserRequestConstants.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/request/UserRequestConstants.java @@ -2,6 +2,7 @@ final class UserRequestConstants { public static final String ATTACHMENTS = "attachments"; + public static final String ATTACHMENTS_WITH_ID = "attachments/%d"; public static final String SETTINGS = "settings"; public static final String SETTINGS_NOTIFICATIONS = SETTINGS + "/notifications"; public static final String TYPING = "typing"; @@ -17,8 +18,11 @@ final class UserRequestConstants { public static final String USERS_WITH_ME = "users/me"; public static final String USERS_MUTED_WITH_ID = USERS_WITH_ME + "/muted_users/%d"; public static final String USERS_PRESENCE = "users/%s/presence"; + public static final String USERS_WITH_ME_PRESENCE = USERS_WITH_ME + "/presence"; public static final String USERS_REACTIVATE = USERS_WITH_ID + "/reactivate"; - public static final String USERS_STATUS = USERS_WITH_ME + "/status"; + public static final String USERS_REALM_PRESENCE = "realm/presence"; + public static final String USERS_STATUS = USERS_WITH_ID + "/status"; + public static final String USERS_OWN_STATUS = USERS_WITH_ME + "/status"; public static final String USERS_ALERT_WORDS = USERS_WITH_ME + "/alert_words"; private UserRequestConstants() { diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/GetAllUserPresenceApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/GetAllUserPresenceApiResponse.java new file mode 100644 index 00000000..8012b494 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/GetAllUserPresenceApiResponse.java @@ -0,0 +1,28 @@ +package com.github.jamesnetherton.zulip.client.api.user.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.api.user.UserPresenceDetail; +import java.util.HashMap; +import java.util.Map; + +/** + * Zulip API response class for getting all users. + * + * @see https://zulip.com/api/get-presence#response + */ +public class GetAllUserPresenceApiResponse extends ZulipApiResponse { + @JsonProperty + Map> presences = new HashMap<>(); + + @JsonProperty + private double serverTimestamp; + + public Map> getPresences() { + return presences; + } + + public double getServerTimestamp() { + return serverTimestamp; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/GetUserStatusApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/GetUserStatusApiResponse.java new file mode 100644 index 00000000..a9fbb54c --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/GetUserStatusApiResponse.java @@ -0,0 +1,19 @@ +package com.github.jamesnetherton.zulip.client.api.user.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.api.user.UserStatus; + +/** + * Zulip API response class for getting a user status. + * + * @see https://zulip.com/api/get-user-status#response + */ +public class GetUserStatusApiResponse extends ZulipApiResponse { + @JsonProperty + private UserStatus status; + + public UserStatus getStatus() { + return status; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/UpdateOwnUserPresenceApiResponse.java b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/UpdateOwnUserPresenceApiResponse.java new file mode 100644 index 00000000..247691a6 --- /dev/null +++ b/src/main/java/com/github/jamesnetherton/zulip/client/api/user/response/UpdateOwnUserPresenceApiResponse.java @@ -0,0 +1,20 @@ +package com.github.jamesnetherton.zulip.client.api.user.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; +import com.github.jamesnetherton.zulip.client.api.user.UserPresenceDetail; +import java.util.Map; + +/** + * Zulip API response class for updating own user presence. + * + * @see https://zulip.com/api/update-presence#response + */ +public class UpdateOwnUserPresenceApiResponse extends ZulipApiResponse { + @JsonProperty + private Map presences; + + public Map getPresences() { + return presences; + } +} diff --git a/src/main/java/com/github/jamesnetherton/zulip/client/http/commons/ZulipCommonsHttpClient.java b/src/main/java/com/github/jamesnetherton/zulip/client/http/commons/ZulipCommonsHttpClient.java index e3cb9cd2..4d129247 100644 --- a/src/main/java/com/github/jamesnetherton/zulip/client/http/commons/ZulipCommonsHttpClient.java +++ b/src/main/java/com/github/jamesnetherton/zulip/client/http/commons/ZulipCommonsHttpClient.java @@ -13,6 +13,7 @@ import java.net.URISyntaxException; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; @@ -44,6 +45,7 @@ import org.apache.hc.client5.http.ssl.TrustSelfSignedStrategy; import org.apache.hc.core5.http.ClassicHttpRequest; import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.ContentType; import org.apache.hc.core5.http.Header; import org.apache.hc.core5.http.HttpEntity; import org.apache.hc.core5.http.HttpHost; @@ -171,8 +173,14 @@ public T post(String path, Map para @Override public T upload(String path, File file, Class responseAs) throws ZulipClientException { + ContentType contentType; + try { + contentType = ContentType.create(Files.probeContentType(file.toPath())); + } catch (IOException e) { + contentType = ContentType.DEFAULT_BINARY; + } HttpEntity entity = MultipartEntityBuilder.create() - .addBinaryBody("files", file) + .addBinaryBody("files", file, contentType, file.getName()) .build(); HttpPost httpPost = new HttpPost(getRequestUri(path, null)); diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/ZulipApiTestBase.java b/src/test/java/com/github/jamesnetherton/zulip/client/ZulipApiTestBase.java index 51693569..1d7c474e 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/ZulipApiTestBase.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/ZulipApiTestBase.java @@ -125,7 +125,7 @@ protected void stubMultiPartZulipResponse(HttpMethod method, String path, String .withMultipartRequestBody( aMultipart() .withName("files") - .withHeader("Content-Type", equalTo("application/octet-stream")) + .withHeader("Content-Type", equalTo("text/plain")) .withBody(equalTo("test content"))) .willReturn(aResponse() .withHeader("Content-Type", "application/json") diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/ZulipIntegrationTestBase.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/ZulipIntegrationTestBase.java index 0bafe9e0..7853a2dd 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/ZulipIntegrationTestBase.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/ZulipIntegrationTestBase.java @@ -5,6 +5,7 @@ import com.github.jamesnetherton.zulip.client.Zulip; import com.github.jamesnetherton.zulip.client.api.core.ZulipApiResponse; import com.github.jamesnetherton.zulip.client.api.draft.Draft; +import com.github.jamesnetherton.zulip.client.api.invitation.Invitation; import com.github.jamesnetherton.zulip.client.api.message.Anchor; import com.github.jamesnetherton.zulip.client.api.message.Message; import com.github.jamesnetherton.zulip.client.api.message.ScheduledMessage; @@ -99,7 +100,6 @@ public void close() { private T handleResponse(T response) { List ignoredParametersUnsupported = response.getIgnoredParametersUnsupported(); if (ignoredParametersUnsupported != null && !ignoredParametersUnsupported.isEmpty()) { - System.out.println("======> " + ignoredParametersUnsupported); throw new IllegalStateException("Unsupported parameters detected in the request"); } return response; @@ -153,11 +153,11 @@ public void afterEach() throws Exception { } // Clean up streams - List streams = zulip.streams().getAll().withIncludeDefault(false).execute(); + List streams = zulip.channels().getAll().withIncludeDefault(false).execute(); if (streams != null) { for (Stream stream : streams) { try { - zulip.streams().delete(stream.getStreamId()).execute(); + zulip.channels().delete(stream.getStreamId()).execute(); } catch (ZulipClientException e) { // Ignore } @@ -205,6 +205,20 @@ public void afterEach() throws Exception { if (!alertWords.isEmpty()) { zulip.users().removeAlertWords(alertWords.toArray(new String[0])); } + + // Clean up invites + List invitations = zulip.invitations().getAllInvitations().execute(); + invitations.forEach(invite -> { + try { + if (invite.isMultiuse()) { + zulip.invitations().revokeReusableInvitation(invite.getId()).execute(); + } else { + zulip.invitations().revokeEmailInvitation(invite.getId()).execute(); + } + } catch (ZulipClientException e) { + // ignore + } + }); } } } diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/event/ZulipEventIT.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/event/ZulipEventIT.java index dce99cef..4389f1e0 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/event/ZulipEventIT.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/event/ZulipEventIT.java @@ -1,6 +1,5 @@ package com.github.jamesnetherton.zulip.client.api.integration.event; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import com.github.jamesnetherton.zulip.client.api.event.EventPoller; @@ -19,10 +18,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -@Disabled public class ZulipEventIT extends ZulipIntegrationTestBase { @Test @@ -62,10 +59,11 @@ public void onEvent(Message event) { messageService.sendStreamMessage("Test Content " + i, streamName, "testtopic").execute(); } - assertTrue(latch.await(5, TimeUnit.SECONDS)); + assertTrue(latch.await(30, TimeUnit.SECONDS)); for (int i = 0; i < 3; i++) { - assertEquals("Test Content " + i, messages.get(i)); + int finalI = i; + assertTrue(messages.stream().anyMatch(message -> message.equals("Test Content " + finalI))); } } catch (ZulipClientException e) { e.printStackTrace(); @@ -115,11 +113,14 @@ public void onEvent(Message event) { messageService.sendStreamMessage("Stream " + streamName + " Content " + i, streamName, "testtopic").execute(); } - assertTrue(latch.await(10, TimeUnit.SECONDS)); + assertTrue(latch.await(30, TimeUnit.SECONDS)); int count = 0; for (int i = 0; i < 5; i++) { - assertEquals("Stream " + streamA + " Content " + count, messages.get(i)); + int finalCount = count; + assertTrue( + messages.stream().anyMatch(message -> message.equals("Stream " + streamA + " Content " + finalCount))); + count += 2; } } catch (ZulipClientException e) { diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/invitation/ZulipInvitationIT.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/invitation/ZulipInvitationIT.java new file mode 100644 index 00000000..92d518c5 --- /dev/null +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/invitation/ZulipInvitationIT.java @@ -0,0 +1,109 @@ +package com.github.jamesnetherton.zulip.client.api.integration.invitation; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import com.github.jamesnetherton.zulip.client.api.integration.ZulipIntegrationTestBase; +import com.github.jamesnetherton.zulip.client.api.invitation.Invitation; +import com.github.jamesnetherton.zulip.client.api.stream.StreamSubscriptionRequest; +import com.github.jamesnetherton.zulip.client.api.user.UserRole; +import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class ZulipInvitationIT extends ZulipIntegrationTestBase { + + @Test + public void reusableInvitationCrudOperations() throws Exception { + zulip.streams() + .subscribe(StreamSubscriptionRequest.of("Test for invitations", "Test for invitations")) + .execute(); + + Long streamId = zulip.streams().getStreamId("Test for invitations").execute(); + + String invitationLink = zulip.invitations().createReusableInvitationLink() + .withIncludeRealmDefaultSubscriptions(true) + .withInviteAs(UserRole.MEMBER) + .inviteExpiresInMinutes(60) + .streamIds(streamId) + .execute(); + + assertTrue(invitationLink.matches("https://localhost/join/.*/")); + + List invitations = zulip.invitations().getAllInvitations().execute(); + assertEquals(1, invitations.size()); + + Invitation invitation = invitations.get(0); + assertTrue(invitation.getId() > 0); + assertEquals(ownUser.getUserId(), invitation.getInvitedByUserId()); + assertEquals(UserRole.MEMBER, invitation.getInvitedAs()); + assertTrue(invitation.getInvited().getEpochSecond() > 0); + assertTrue(invitation.getExpiryDate().getEpochSecond() > 0); + assertNull(invitation.getEmail()); + assertTrue(invitation.getLinkUrl().matches("https://localhost/join/.*/")); + assertFalse(invitation.isNotifyReferrerOnJoin()); + assertTrue(invitation.isMultiuse()); + + zulip.invitations().revokeReusableInvitation(invitation.getId()).execute(); + + invitations = zulip.invitations().getAllInvitations().execute(); + assertTrue(invitations.isEmpty()); + } + + @Test + public void emailInvitationCrudOperations() throws Exception { + zulip.streams() + .subscribe(StreamSubscriptionRequest.of("Test for invitations", "Test for invitations")) + .execute(); + + Long streamId = zulip.streams().getStreamId("Test for invitations").execute(); + + zulip.invitations().sendInvitations(List.of("foo@bar.com, cheese@wine.com"), List.of(streamId)) + .withInviteAs(UserRole.MEMBER) + .inviteExpiresInMinutes(60) + .withNotifyReferrerOnJoin(true) + .withIncludeRealmDefaultSubscriptions(true) + .execute(); + + List invitations = zulip.invitations().getAllInvitations().execute(); + assertEquals(2, invitations.size()); + + Invitation invitation = invitations.stream().filter(invite -> invite.getEmail().equals("foo@bar.com")).findFirst() + .get(); + assertTrue(invitation.getId() > 0); + assertEquals(ownUser.getUserId(), invitation.getInvitedByUserId()); + assertEquals(UserRole.MEMBER, invitation.getInvitedAs()); + assertTrue(invitation.getInvited().getEpochSecond() > 0); + assertTrue(invitation.getExpiryDate().getEpochSecond() > 0); + assertEquals("foo@bar.com", invitation.getEmail()); + assertNull(invitation.getLinkUrl()); + assertTrue(invitation.isNotifyReferrerOnJoin()); + assertFalse(invitation.isMultiuse()); + + invitation = invitations.stream().filter(invite -> invite.getEmail().equals("cheese@wine.com")).findFirst().get(); + assertTrue(invitation.getId() > 0); + assertEquals(ownUser.getUserId(), invitation.getInvitedByUserId()); + assertEquals(UserRole.MEMBER, invitation.getInvitedAs()); + assertTrue(invitation.getInvited().getEpochSecond() > 0); + assertTrue(invitation.getExpiryDate().getEpochSecond() > 0); + assertEquals("cheese@wine.com", invitation.getEmail()); + assertNull(invitation.getLinkUrl()); + assertTrue(invitation.isNotifyReferrerOnJoin()); + assertFalse(invitation.isMultiuse()); + + zulip.invitations().resendEmailInvitation(invitation.getId()).execute(); + + invitations.forEach(invite -> { + try { + zulip.invitations().revokeEmailInvitation(invite.getId()).execute(); + } catch (ZulipClientException e) { + throw new RuntimeException(e); + } + }); + + invitations = zulip.invitations().getAllInvitations().execute(); + assertTrue(invitations.isEmpty()); + } +} diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/message/ZulipMessageIT.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/message/ZulipMessageIT.java index 52c01a31..fca91c09 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/message/ZulipMessageIT.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/message/ZulipMessageIT.java @@ -64,7 +64,7 @@ public void messageCrudOperations() throws ZulipClientException { assertEquals(2, messages.size()); Message message = messages.get(0); assertEquals("Internal", message.getClient()); - assertEquals("stream events", message.getSubject()); + assertEquals("channel events", message.getSubject()); assertEquals("Test Message Stream 1", message.getStream()); assertEquals(MessageType.STREAM, message.getType()); @@ -110,7 +110,7 @@ public void messageCrudOperations() throws ZulipClientException { assertEquals(2, messages.size()); message = messages.get(0); assertEquals("Internal", message.getClient()); - assertEquals("stream events", message.getSubject()); + assertEquals("channel events", message.getSubject()); assertEquals("Test Message Stream 2", message.getStream()); assertEquals(MessageType.STREAM, message.getType()); @@ -190,6 +190,102 @@ public void messageCrudOperations() throws ZulipClientException { assertEquals(1, messages.size()); } + @Test + public void channelMessages() throws ZulipClientException { + zulip.channels().subscribe( + StreamSubscriptionRequest.of("Test Message Channel 1", "Test Message Channel 1"), + StreamSubscriptionRequest.of("Test Message Channel 2", "Test Message Channel 2")) + .withAuthorizationErrorsFatal(false) + .withHistoryPublicToSubscribers(true) + .withInviteOnly(false) + .withAnnounce(true) + .withMessageRetention(RetentionPolicy.UNLIMITED) + .withStreamPostPolicy(StreamPostPolicy.ANY) + .execute(); + + Long streamId = zulip.channels().getStreamId("Test Message Channel 2").execute(); + + // Create messages using each variant of sendStreamMessage + zulip.messages().sendChannelMessage("Test Content", "Test Message Channel 1", "Test Topic 1") + .withReadBySender(true) + .execute(); + zulip.messages().sendChannelMessage("Test Content", streamId, "Test Topic 2").execute(); + + List messages = zulip.messages().getMessages(100, 0, Anchor.NEWEST) + .withNarrows(Narrow.of("channel", "Test Message Channel 1")) + .execute(); + + assertEquals(2, messages.size()); + Message message = messages.get(0); + assertEquals("Internal", message.getClient()); + assertEquals("channel events", message.getSubject()); + assertEquals("Test Message Channel 1", message.getStream()); + assertEquals(MessageType.STREAM, message.getType()); + + message = messages.get(1); + // TODO: Handle null avatar URL properly + // https://github.com/jamesnetherton/zulip-java-client/issues/149 + assertNull(message.getAvatarUrl()); + // assertTrue(message.getAvatarUrl().startsWith("https://secure.gravatar.com")); + assertEquals("

Test Content

", message.getContent()); + assertEquals("text/html", message.getContentType()); + assertEquals("Apache-HttpClient", message.getClient()); + assertEquals("Test Message Channel 1", message.getStream()); + assertEquals(MessageType.STREAM, message.getType()); + assertTrue(message.getId() > 0); + assertEquals("test@test.com", message.getSenderEmail()); + assertEquals("tester", message.getSenderFullName()); + assertEquals("Test Topic 1", message.getSubject()); + assertNotNull(message.getTimestamp()); + assertFalse(message.isMeMessage()); + + message = zulip.messages().getMessage(message.getId()).execute(); + // TODO: Handle null avatar URL properly + // https://github.com/jamesnetherton/zulip-java-client/issues/149 + assertNull(message.getAvatarUrl()); + // assertTrue(message.getAvatarUrl().startsWith("https://secure.gravatar.com")); + assertEquals("

Test Content

", message.getContent()); + assertEquals("text/html", message.getContentType()); + assertEquals("Apache-HttpClient", message.getClient()); + assertEquals("Test Message Channel 1", message.getStream()); + assertEquals(MessageType.STREAM, message.getType()); + assertTrue(message.getId() > 0); + assertEquals("test@test.com", message.getSenderEmail()); + assertEquals("tester", message.getSenderFullName()); + assertEquals("Test Topic 1", message.getSubject()); + assertNotNull(message.getTimestamp()); + assertFalse(message.isMeMessage()); + + messages = zulip.messages().getMessages(100, 0, Anchor.NEWEST) + .withIncludeAnchor(true) + .withNarrows(Narrow.of("channel", "Test Message Channel 2")) + .execute(); + + assertEquals(2, messages.size()); + message = messages.get(0); + assertEquals("Internal", message.getClient()); + assertEquals("channel events", message.getSubject()); + assertEquals("Test Message Channel 2", message.getStream()); + assertEquals(MessageType.STREAM, message.getType()); + + message = messages.get(1); + // TODO: Handle null avatar URL properly + // https://github.com/jamesnetherton/zulip-java-client/issues/149 + assertNull(message.getAvatarUrl()); + // assertTrue(message.getAvatarUrl().startsWith("https://secure.gravatar.com")); + assertEquals("

Test Content

", message.getContent()); + assertEquals("text/html", message.getContentType()); + assertEquals("Apache-HttpClient", message.getClient()); + assertEquals("Test Message Channel 2", message.getStream()); + assertEquals(MessageType.STREAM, message.getType()); + assertTrue(message.getId() > 0); + assertEquals("test@test.com", message.getSenderEmail()); + assertEquals("tester", message.getSenderFullName()); + assertEquals("Test Topic 2", message.getSubject()); + assertNotNull(message.getTimestamp()); + assertFalse(message.isMeMessage()); + } + @Test public void reactions() throws ZulipClientException { zulip.streams().subscribe( @@ -250,7 +346,7 @@ public void directMessages() throws ZulipClientException { long firstMessageId = zulip.messages().sendDirectMessage("Test Direct Message 1", "test@test.com") .execute(); - long secondMessageId = zulip.messages().sendPrivateMessage("Test Direct Message 2", ownUser.getUserId()) + long secondMessageId = zulip.messages().sendDirectMessage("Test Direct Message 2", ownUser.getUserId()) .execute(); // Get private messages diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/server/ZulipServerIT.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/server/ZulipServerIT.java index 9dd32458..2fa98460 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/server/ZulipServerIT.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/server/ZulipServerIT.java @@ -25,6 +25,8 @@ import com.github.jamesnetherton.zulip.client.api.user.DesktopIconCountDisplay; import com.github.jamesnetherton.zulip.client.api.user.EmojiSet; import com.github.jamesnetherton.zulip.client.api.user.UserListStyle; +import com.github.jamesnetherton.zulip.client.api.user.WebAnimateImageOption; +import com.github.jamesnetherton.zulip.client.api.user.WebChannelView; import com.github.jamesnetherton.zulip.client.api.user.WebHomeView; import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; import java.io.File; @@ -103,7 +105,7 @@ public void emoji() throws ZulipClientException { CustomEmoji emoji = optional.get(); assertEquals(emojiName, emoji.getName()); - assertTrue(emoji.getSourceUrl().endsWith(emoji.getId() + ".png")); + assertTrue(emoji.getSourceUrl().endsWith(".png")); assertNull(emoji.getStillUrl()); assertTrue(emoji.getAuthorId() > 0); assertTrue(emoji.getId() > 0); @@ -162,6 +164,7 @@ public void customProfileFieldsCrud() throws ZulipClientException { long externalId = zulip.server().createCustomProfileField() .withExternalAccountFieldType(externalData) .withDisplayInProfileSummary(true) + .withRequired(true) .execute(); assertTrue(externalId > 0); @@ -277,6 +280,7 @@ public void updateRealmNewUserDefaultSettings() throws ZulipClientException { .withPresenceEnabled(true) .withRealmNameInNotifications(true) .withRealmNameInEmailNotifications(RealmNameInNotificationsPolicy.ALWAYS) + .withReceivesTypingNotifications(true) .withSendPrivateTypingNotifications(true) .withSendReadReceipts(true) .withSendStreamTypingNotifications(true) @@ -284,11 +288,33 @@ public void updateRealmNewUserDefaultSettings() throws ZulipClientException { .withTranslateEmoticons(true) .withTwentyFourHourTime(true) .withUserListStyle(UserListStyle.WITH_STATUS) + .withWebAnimateImagePreviews(WebAnimateImageOption.ON_HOVER) + .withWebChannelDefaultView(WebChannelView.CHANNEL_FEED) + .withWebFontPx(11) + .withWebLineHeightPercent(120) .withWebMarkReadOnScrollPolicy(MarkReadOnScrollPolicy.CONSERVATION_VIEWS) .withWebStreamUnreadsCountDisplayPolicy(WebStreamUnreadsCountDisplayPolicy.ALL_STREAMS) + .withWebNavigateToSentMessage(true) .withWildcardMentionsNotify(true) .execute(); assertNotNull(result); } + + @Test + public void sendMobilePushTestNotification() throws ZulipClientException { + zulip.server().sendMobilePushTestNotification().execute(); + } + + @Test + public void apnsDeviceToken() throws ZulipClientException { + zulip.server().addApnsDeviceToken("test", "test").execute(); + zulip.server().removeApnsDeviceToken("test").execute(); + } + + @Test + public void fcmRegistrationToken() throws ZulipClientException { + zulip.server().addFcmRegsitrationToken("test").execute(); + zulip.server().removeFcmRegistrationToken("test").execute(); + } } diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/stream/ZulipStreamIT.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/stream/ZulipStreamIT.java index 565d6ac8..84c491a4 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/stream/ZulipStreamIT.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/stream/ZulipStreamIT.java @@ -28,11 +28,11 @@ public class ZulipStreamIT extends ZulipIntegrationTestBase { @Test public void streamCrudOperations() throws Exception { List groups = zulip.users().getUserGroups().execute(); - long groupIdA = groups.get(1).getId(); - long groupIdB = groups.get(2).getId(); + long groupIdA = groups.get(3).getId(); + long groupIdB = groups.get(4).getId(); // Create - StreamSubscriptionResult result = zulip.streams().subscribe( + StreamSubscriptionResult result = zulip.channels().subscribe( StreamSubscriptionRequest.of("Test Stream 1", "Test Stream 1"), StreamSubscriptionRequest.of("Test Stream 2", "Test Stream 2"), StreamSubscriptionRequest.of("Test Stream 3", "Test Stream 3")) @@ -51,7 +51,7 @@ public void streamCrudOperations() throws Exception { assertEquals(3, created.get("test@test.com").size()); // Read - List streams = zulip.streams().getAll() + List streams = zulip.channels().getAll() .withIncludeDefault(true) .execute(); @@ -63,6 +63,7 @@ public void streamCrudOperations() throws Exception { Stream stream = createdStreams.get(i - 1); assertEquals("Test Stream " + i, stream.getDescription()); assertEquals("

Test Stream " + i + "

", stream.getRenderedDescription()); + assertEquals(ownUser.getUserId(), stream.getCreatorId()); assertTrue(stream.getDateCreated().toEpochMilli() > 0); assertFalse(stream.isInviteOnly()); assertEquals("Test Stream " + i, stream.getName()); @@ -79,9 +80,10 @@ public void streamCrudOperations() throws Exception { // Get stream by ID for (int i = 1; i < createdStreams.size(); i++) { - Stream stream = zulip.streams().getStream(createdStreams.get(i - 1).getStreamId()).execute(); + Stream stream = zulip.channels().getStream(createdStreams.get(i - 1).getStreamId()).execute(); assertEquals("Test Stream " + i, stream.getDescription()); assertEquals("

Test Stream " + i + "

", stream.getRenderedDescription()); + assertEquals(ownUser.getUserId(), stream.getCreatorId()); assertTrue(stream.getDateCreated().toEpochMilli() > 0); assertFalse(stream.isInviteOnly()); assertEquals("Test Stream " + i, stream.getName()); @@ -98,7 +100,7 @@ public void streamCrudOperations() throws Exception { long firstStreamId = createdStreams.get(0).getStreamId(); // Update - zulip.streams().updateStream(firstStreamId) + zulip.channels().updateStream(firstStreamId) .withCanRemoveSubscribersGroup(groupIdB) .withDescription("Updated Description") .withName("Updated Name") @@ -110,7 +112,7 @@ public void streamCrudOperations() throws Exception { .withStreamPostPolicy(StreamPostPolicy.ADMIN_ONLY) .execute(); - Optional updatedStreamOptional = zulip.streams().getAll() + Optional updatedStreamOptional = zulip.channels().getAll() .execute() .stream().filter(stream -> stream.getStreamId() == firstStreamId) .findFirst(); @@ -132,7 +134,7 @@ public void streamCrudOperations() throws Exception { assertTrue(updatedStream.isAnnouncementOnly()); assertEquals(groupIdB, updatedStream.canRemoveSubscribersGroup()); - List subscriptionSettings = zulip.streams().updateSubscriptionSettings() + List subscriptionSettings = zulip.channels().updateSubscriptionSettings() .withColor(updatedStream.getStreamId(), "#000000") .withAudibleNotifications(updatedStream.getStreamId(), true) .withDesktopNotifications(updatedStream.getStreamId(), true) @@ -146,10 +148,10 @@ public void streamCrudOperations() throws Exception { assertTrue(subscriptionSettings.isEmpty()); // Delete - zulip.streams().delete(firstStreamId).execute(); + zulip.channels().delete(firstStreamId).execute(); // Verify deletion - streams = zulip.streams().getAll() + streams = zulip.channels().getAll() .withIncludeDefault(true) .execute(); assertEquals(2, streams.size()); @@ -158,7 +160,7 @@ public void streamCrudOperations() throws Exception { @Test public void streamTopics() throws ZulipClientException { // Create - zulip.streams().subscribe( + zulip.channels().subscribe( StreamSubscriptionRequest.of("Test Stream For Topic", "Test Stream For Topic")) .withAuthorizationErrorsFatal(false) .withHistoryPublicToSubscribers(true) @@ -168,25 +170,25 @@ public void streamTopics() throws ZulipClientException { .execute(); // Get ID - Long streamId = zulip.streams().getStreamId("Test Stream For Topic").execute(); + Long streamId = zulip.channels().getStreamId("Test Stream For Topic").execute(); - List topics = zulip.streams().getTopics(streamId).execute(); + List topics = zulip.channels().getTopics(streamId).execute(); assertEquals(1, topics.size()); Topic topic = topics.get(0); - assertEquals("stream events", topic.getName()); + assertEquals("channel events", topic.getName()); assertTrue(topic.getMaxId() > 0); } @Test public void streamSubscribeUnsubscribe() throws ZulipClientException { // Create - zulip.streams().subscribe( + zulip.channels().subscribe( StreamSubscriptionRequest.of("Test Subscribed", "Test Subscribed")) .execute(); // Check subscriptions - List subscriptions = zulip.streams().getSubscribedStreams() + List subscriptions = zulip.channels().getSubscribedStreams() .withIncludeSubscribers(true) .execute(); assertEquals(1, subscriptions.size()); @@ -203,6 +205,7 @@ public void streamSubscribeUnsubscribe() throws ZulipClientException { assertFalse(streamSubscription.isWildcardMentionsNotify()); assertNotNull(streamSubscription.getColor()); assertTrue(streamSubscription.getColor().matches("#[a-z0-9]+")); + assertEquals(ownUser.getUserId(), streamSubscription.getCreatorId()); assertEquals("Test Subscribed", streamSubscription.getDescription()); assertTrue(streamSubscription.getFirstMessageId() > 0); assertEquals(0, streamSubscription.getMessageRetentionDays()); @@ -210,7 +213,7 @@ public void streamSubscribeUnsubscribe() throws ZulipClientException { assertEquals("

Test Subscribed

", streamSubscription.getRenderedDescription()); assertTrue(streamSubscription.getStreamId() > 0); assertEquals(0, streamSubscription.getStreamWeeklyTraffic()); - assertEquals(2, streamSubscription.getCanRemoveSubscribersGroup()); + assertEquals(11, streamSubscription.getCanRemoveSubscribersGroup()); List subscribers = streamSubscription.getSubscribers(); assertEquals(1, subscribers.size()); @@ -219,20 +222,20 @@ public void streamSubscribeUnsubscribe() throws ZulipClientException { assertEquals("8", subscriberId); // Get ID - Long streamId = zulip.streams().getStreamId("Test Subscribed").execute(); + Long streamId = zulip.channels().getStreamId("Test Subscribed").execute(); // Verify subscribed - assertTrue(zulip.streams().isSubscribed(ownUser.getUserId(), streamId).execute()); + assertTrue(zulip.channels().isSubscribed(ownUser.getUserId(), streamId).execute()); // Unsubscribe - zulip.streams().unsubscribe("Test Subscribed").execute(); - assertFalse(zulip.streams().isSubscribed(ownUser.getUserId(), streamId).execute()); + zulip.channels().unsubscribe("Test Subscribed").execute(); + assertFalse(zulip.channels().isSubscribed(ownUser.getUserId(), streamId).execute()); } @Test public void deleteStreamTopic() throws ZulipClientException { // Create stream & topic - zulip.streams().subscribe( + zulip.channels().subscribe( StreamSubscriptionRequest.of("Test Stream For Topic", "Test Stream For Topic")) .withAuthorizationErrorsFatal(false) .withHistoryPublicToSubscribers(true) @@ -241,27 +244,27 @@ public void deleteStreamTopic() throws ZulipClientException { .withStreamPostPolicy(StreamPostPolicy.ANY) .execute(); - Long streamId = zulip.streams().getStreamId("Test Stream For Topic").execute(); + Long streamId = zulip.channels().getStreamId("Test Stream For Topic").execute(); - List topics = zulip.streams().getTopics(streamId).execute(); + List topics = zulip.channels().getTopics(streamId).execute(); assertEquals(1, topics.size()); Topic topic = topics.get(0); - assertEquals("stream events", topic.getName()); + assertEquals("channel events", topic.getName()); assertTrue(topic.getMaxId() > 0); // Delete topic - zulip.streams().deleteTopic(streamId, topic.getName()).execute(); + zulip.channels().deleteTopic(streamId, topic.getName()).execute(); // Verify deletion - topics = zulip.streams().getTopics(streamId).execute(); + topics = zulip.channels().getTopics(streamId).execute(); assertTrue(topics.isEmpty()); } @Test public void archiveStream() throws ZulipClientException { // Create stream & topic - zulip.streams().subscribe( + zulip.channels().subscribe( StreamSubscriptionRequest.of("Test Stream For Topic", "Test Stream For Topic")) .withAuthorizationErrorsFatal(false) .withHistoryPublicToSubscribers(true) @@ -270,76 +273,76 @@ public void archiveStream() throws ZulipClientException { .withStreamPostPolicy(StreamPostPolicy.ANY) .execute(); - Long streamId = zulip.streams().getStreamId("Test Stream For Topic").execute(); + Long streamId = zulip.channels().getStreamId("Test Stream For Topic").execute(); // Archive stream - zulip.streams().archiveStream(streamId).execute(); + zulip.channels().archiveStream(streamId).execute(); // Verify archival - List streams = zulip.streams().getAll().execute(); + List streams = zulip.channels().getAll().execute(); assertTrue(streams.isEmpty()); } @Test public void updateUserTopicPreferences() throws ZulipClientException { - StreamSubscriptionResult result = zulip.streams() + StreamSubscriptionResult result = zulip.channels() .subscribe(StreamSubscriptionRequest.of("Test Stream For Muting", "Test Stream For Muting")).execute(); Map> subscribed = result.getSubscribed(); assertEquals(1, subscribed.size()); - Long streamId = zulip.streams().getStreamId("Test Stream For Muting").execute(); + Long streamId = zulip.channels().getStreamId("Test Stream For Muting").execute(); - zulip.streams().muteTopic("Test Stream For Muting") + zulip.channels().muteTopic("Test Stream For Muting") .withStreamId(streamId) .execute(); - zulip.streams().unmuteTopic("Test Stream For Muting") + zulip.channels().unmuteTopic("Test Stream For Muting") .withStreamId(streamId) .execute(); for (TopicVisibilityPolicy topicVisibilityPolicy : TopicVisibilityPolicy.values()) { - zulip.streams().updateUserTopicPreferences(streamId, "Test Stream For Muting", topicVisibilityPolicy).execute(); + zulip.channels().updateUserTopicPreferences(streamId, "Test Stream For Muting", topicVisibilityPolicy).execute(); } } @Test public void defaultStreams() throws ZulipClientException { - StreamSubscriptionResult result = zulip.streams() + StreamSubscriptionResult result = zulip.channels() .subscribe(StreamSubscriptionRequest.of("Test Stream For Defaulting", "Test Stream For Defaulting")) .execute(); Map> subscribed = result.getSubscribed(); assertEquals(1, subscribed.size()); - Long streamId = zulip.streams().getStreamId("Test Stream For Defaulting").execute(); + Long streamId = zulip.channels().getStreamId("Test Stream For Defaulting").execute(); - zulip.streams().addDefaultStream(streamId).execute(); + zulip.channels().addDefaultStream(streamId).execute(); String uuid = UUID.randomUUID().toString().substring(0, 5); long userIdA = zulip.users().createUser("foo@" + uuid + ".com", "Foo Bar", "f00B4r").execute(); - List subscribers = zulip.streams().getStreamSubscribers(streamId).execute(); + List subscribers = zulip.channels().getStreamSubscribers(streamId).execute(); assertTrue(subscribers.contains(userIdA)); - zulip.streams().removeDefaultStream(streamId).execute(); + zulip.channels().removeDefaultStream(streamId).execute(); long userIdB = zulip.users().createUser("bar@" + uuid + ".com", "Bar Foo", "f00B4r").execute(); - subscribers = zulip.streams().getStreamSubscribers(streamId).execute(); + subscribers = zulip.channels().getStreamSubscribers(streamId).execute(); assertFalse(subscribers.contains(userIdB)); } @Test public void streamEmailAddress() throws ZulipClientException { - StreamSubscriptionResult result = zulip.streams() + StreamSubscriptionResult result = zulip.channels() .subscribe(StreamSubscriptionRequest.of("Test Stream For Email", "Test Stream For Email")) .execute(); Map> subscribed = result.getSubscribed(); assertEquals(1, subscribed.size()); - Long streamId = zulip.streams().getStreamId("Test Stream For Email").execute(); - String email = zulip.streams().getStreamEmailAddress(streamId).execute(); + Long streamId = zulip.channels().getStreamId("Test Stream For Email").execute(); + String email = zulip.channels().getStreamEmailAddress(streamId).execute(); assertNotNull(email); } } diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/user/ZulipUserIT.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/user/ZulipUserIT.java index a1f4529a..d7a63d6b 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/user/ZulipUserIT.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/integration/user/ZulipUserIT.java @@ -7,6 +7,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import com.github.jamesnetherton.zulip.client.api.integration.ZulipIntegrationTestBase; +import com.github.jamesnetherton.zulip.client.api.message.ReactionType; import com.github.jamesnetherton.zulip.client.api.server.MarkReadOnScrollPolicy; import com.github.jamesnetherton.zulip.client.api.server.RealmNameInNotificationsPolicy; import com.github.jamesnetherton.zulip.client.api.stream.StreamPostPolicy; @@ -22,7 +23,11 @@ import com.github.jamesnetherton.zulip.client.api.user.UserGroup; import com.github.jamesnetherton.zulip.client.api.user.UserListStyle; import com.github.jamesnetherton.zulip.client.api.user.UserPresenceDetail; +import com.github.jamesnetherton.zulip.client.api.user.UserPresenceStatus; import com.github.jamesnetherton.zulip.client.api.user.UserRole; +import com.github.jamesnetherton.zulip.client.api.user.UserStatus; +import com.github.jamesnetherton.zulip.client.api.user.WebAnimateImageOption; +import com.github.jamesnetherton.zulip.client.api.user.WebChannelView; import com.github.jamesnetherton.zulip.client.api.user.WebHomeView; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateNotificationSettingsApiRequest; import com.github.jamesnetherton.zulip.client.exception.ZulipClientException; @@ -201,8 +206,7 @@ public void userAttachments() throws Exception { List attachments = zulip.users().getUserAttachments().execute(); assertFalse(attachments.isEmpty()); - Thread.sleep(10000); - + long attachmentId = 0; boolean matched = false; for (UserAttachment attachment : attachments) { if (!attachment.getMessages().isEmpty()) { @@ -222,11 +226,30 @@ public void userAttachments() throws Exception { UserAttachmentMessage message = optional.get(); assertEquals(messageId, message.getId()); assertTrue(message.getDateSent().toEpochMilli() > 0); + + attachmentId = attachment.getId(); } } } assertTrue(matched); + + boolean deletedMessageMatched = false; + zulip.users().deleteAttachment(attachmentId).execute(); + attachments = zulip.users().getUserAttachments().execute(); + for (UserAttachment attachment : attachments) { + if (!attachment.getMessages().isEmpty()) { + Optional optional = attachment.getMessages().stream() + .filter(m -> m.getId() == messageId) + .findFirst(); + + if (optional.isPresent()) { + deletedMessageMatched = true; + } + } + } + + assertFalse(deletedMessageMatched); } @Test @@ -263,6 +286,36 @@ public void userPresence() throws ZulipClientException { assertTrue(website.getTimestamp().toEpochMilli() > 0); } + @Test + public void getAllUserPresence() throws ZulipClientException { + Map> presences = zulip.users().getAllUserPresence().execute(); + assertNotNull(presences); + + Map testUserPresence = presences.get("test@test.com"); + assertNotNull(testUserPresence); + + UserPresenceDetail aggregated = testUserPresence.get("aggregated"); + assertNotNull(aggregated); + assertTrue(aggregated.getTimestamp().toEpochMilli() > 0); + assertEquals(UserPresenceStatus.ACTIVE, aggregated.getStatus()); + + UserPresenceDetail website = testUserPresence.get("website"); + assertNotNull(website); + assertTrue(website.getTimestamp().toEpochMilli() > 0); + assertEquals(UserPresenceStatus.ACTIVE, website.getStatus()); + } + + @Test + public void updateOwnUserPresence() throws ZulipClientException { + Map userPresenceDetails = zulip.users().updateOwnUserPresence(UserPresenceStatus.ACTIVE) + .withNewUserInput(true) + .execute(); + + UserPresenceDetail userPresenceDetail = userPresenceDetails.get(ownUser.getUserId()); + assertTrue(userPresenceDetail.getActiveTimestamp().toEpochMilli() > 0); + assertTrue(userPresenceDetail.getIdleTimestamp().toEpochMilli() > 0); + } + @Test public void updateNotificationSettings() throws ZulipClientException { try { @@ -296,8 +349,9 @@ public void updateNotificationSettings() throws ZulipClientException { @Test public void userGroupCrud() throws ZulipClientException { // Create group + List execute = zulip.users().getUserGroups().execute(); zulip.users().createUserGroup("Test Group Name", "Test Group Description", ownUser.getUserId()) - .withCanMentionGroup(2) + .withCanMentionGroup(11) .execute(); // Get group @@ -310,7 +364,7 @@ public void userGroupCrud() throws ZulipClientException { assertTrue(group.getId() > 0); assertNotNull(group.getDirectSubgroupIds()); assertFalse(group.isSystemGroup()); - assertEquals(2, group.getCanMentionGroup()); + assertEquals(11, group.getCanMentionGroup()); List members = group.getMembers(); assertEquals(1, members.size()); @@ -319,7 +373,7 @@ public void userGroupCrud() throws ZulipClientException { // Update group zulip.users().updateUserGroup(group.getId()).withName("Updated Group Name").execute(); zulip.users().updateUserGroup("Updated Group Name", "Updated Group Description", group.getId()) - .withCanMentionGroup(3) + .withCanMentionGroup(11, 12) .execute(); groups = zulip.users().getUserGroups().execute(); @@ -328,7 +382,7 @@ public void userGroupCrud() throws ZulipClientException { group = groups.get(groups.size() - 1); assertEquals("Updated Group Name", group.getName()); assertEquals("Updated Group Description", group.getDescription()); - assertEquals(3, group.getCanMentionGroup()); + assertEquals(12, group.getCanMentionGroup()); // Add new user to group String id = UUID.randomUUID().toString().split("-")[0]; @@ -386,12 +440,32 @@ public void updateOwnUserStatus() throws ZulipClientException { zulip.users().updateOwnUserStatus() .withAway(true) .withStatusText("test status") + .withEmojiCode("1f697") + .withEmojiName("car") + .withReactionType(ReactionType.UNICODE) .execute(); + UserStatus userStatus = zulip.users().getUserStatus(ownUser.getUserId()).execute(); + assertTrue(userStatus.isAway()); + assertEquals("test status", userStatus.getStatusText()); + assertEquals("1f697", userStatus.getEmojiCode()); + assertEquals("car", userStatus.getEmojiName()); + assertEquals(ReactionType.UNICODE, userStatus.getReactionType()); + zulip.users().updateOwnUserStatus() .withAway(false) .withStatusText("") + .withEmojiCode("") + .withEmojiName("") .execute(); + + userStatus = zulip.users().getUserStatus(ownUser.getUserId()).execute(); + assertFalse(userStatus.isAway()); + assertNull(userStatus.getStatusText()); + assertNull(userStatus.getEmojiCode()); + assertNull(userStatus.getEmojiName()); + assertNull(userStatus.getReactionType()); + } @Test @@ -429,6 +503,7 @@ public void updateOwnUserSettings() throws ZulipClientException { .withPresenceEnabled(true) .withRealmNameInNotifications(true) .withRealmNameInEmailNotifications(RealmNameInNotificationsPolicy.ALWAYS) + .withReceivesTypingNotifications(true) .withSendPrivateTypingNotifications(true) .withSendReadReceipts(true) .withSendStreamTypingNotifications(true) @@ -437,7 +512,12 @@ public void updateOwnUserSettings() throws ZulipClientException { .withTranslateEmoticons(true) .withTwentyFourHourTime(true) .withUserListStyle(UserListStyle.COMPACT) + .withWebAnimateImagePreviews(WebAnimateImageOption.ON_HOVER) + .withWebChannelDefaultView(WebChannelView.CHANNEL_FEED) + .withWebFontPx(11) + .withWebLineHeightPercent(120) .withWebMarkReadOnScrollPolicy(MarkReadOnScrollPolicy.CONSERVATION_VIEWS) + .withWebNavigateToSentMessage(true) .withWildcardMentionsNotify(true) .execute(); diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/invitation/ZulipInvitationApiTest.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/invitation/ZulipInvitationApiTest.java new file mode 100644 index 00000000..d5c1a457 --- /dev/null +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/invitation/ZulipInvitationApiTest.java @@ -0,0 +1,102 @@ +package com.github.jamesnetherton.zulip.client.api.invitation; + +import static com.github.jamesnetherton.zulip.client.ZulipApiTestBase.HttpMethod.DELETE; +import static com.github.jamesnetherton.zulip.client.ZulipApiTestBase.HttpMethod.GET; +import static com.github.jamesnetherton.zulip.client.ZulipApiTestBase.HttpMethod.POST; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import com.github.jamesnetherton.zulip.client.ZulipApiTestBase; +import com.github.jamesnetherton.zulip.client.api.invitation.request.CreateReusableInvitationLinkApiRequest; +import com.github.jamesnetherton.zulip.client.api.invitation.request.SendInvitationsApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.UserRole; +import com.github.tomakehurst.wiremock.matching.StringValuePattern; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class ZulipInvitationApiTest extends ZulipApiTestBase { + @Test + public void createReusableInvitationLink() throws Exception { + Map params = QueryParams.create() + .add(CreateReusableInvitationLinkApiRequest.INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS, "true") + .add(CreateReusableInvitationLinkApiRequest.INVITE_AS, String.valueOf(UserRole.ORGANIZATION_ADMIN.getId())) + .add(CreateReusableInvitationLinkApiRequest.INVITE_EXPIRES_IN_MINUTES, "60") + .add(CreateReusableInvitationLinkApiRequest.STREAM_IDS, "[1,2,3]") + .get(); + + stubZulipResponse(POST, "/invites/multiuse", params, "createInvitationLink.json"); + + String invitationLink = zulip.invitations().createReusableInvitationLink() + .withIncludeRealmDefaultSubscriptions(true) + .withInviteAs(UserRole.ORGANIZATION_ADMIN) + .inviteExpiresInMinutes(60) + .streamIds(1, 2, 3) + .execute(); + + assertEquals("https://example.zulipchat.com/join/yddhtzk4jgl7rsmazc5fyyyy/", invitationLink); + } + + @Test + public void getAllInvitations() throws Exception { + stubZulipResponse(GET, "/invites", "getAllInvitations.json"); + + List invitations = zulip.invitations().getAllInvitations().execute(); + for (int i = 0; i < invitations.size(); i++) { + Invitation invitation = invitations.get(i); + + UserRole role = i == 0 ? UserRole.ORGANIZATION_OWNER : UserRole.ORGANIZATION_ADMIN; + assertEquals(i + 1, invitation.getId()); + assertEquals(i + 1, invitation.getInvitedByUserId()); + assertEquals(role, invitation.getInvitedAs()); + assertEquals(1710606654, invitation.getInvited().getEpochSecond()); + assertEquals(1710606654, invitation.getExpiryDate().getEpochSecond()); + assertEquals("example@zulip.com", invitation.getEmail()); + assertEquals("https://example.zulipchat.com/join/" + (i + 1) + "/", invitation.getLinkUrl()); + assertTrue(invitation.isNotifyReferrerOnJoin()); + assertTrue(invitation.isMultiuse()); + } + } + + @Test + public void resendEmailInvitation() throws Exception { + stubZulipResponse(POST, "/invites/1/resend", SUCCESS_JSON); + + zulip.invitations().resendEmailInvitation(1).execute(); + } + + @Test + public void revokeEmailInvitation() throws Exception { + stubZulipResponse(DELETE, "/invites/1", SUCCESS_JSON); + + zulip.invitations().revokeEmailInvitation(1).execute(); + } + + @Test + public void revokeReusableInvitation() throws Exception { + stubZulipResponse(DELETE, "/invites/multiuse/1", SUCCESS_JSON); + + zulip.invitations().revokeReusableInvitation(1).execute(); + } + + @Test + public void sendInvitations() throws Exception { + Map params = QueryParams.create() + .add(SendInvitationsApiRequest.INVITEE_EMAILS, "foo@bar.com, cheese@wine.com") + .add(SendInvitationsApiRequest.INCLUDE_REALM_DEFAULT_SUBSCRIPTIONS, "true") + .add(SendInvitationsApiRequest.INVITE_AS, String.valueOf(UserRole.MEMBER.getId())) + .add(SendInvitationsApiRequest.INVITE_EXPIRES_IN_MINUTES, "60") + .add(SendInvitationsApiRequest.NOTIFIY_REFERRER_ON_JOIN, "true") + .add(SendInvitationsApiRequest.STREAM_IDS, "[1,2,3]") + .get(); + + stubZulipResponse(POST, "/invites", params, SUCCESS_JSON); + + zulip.invitations().sendInvitations(List.of("foo@bar.com, cheese@wine.com"), List.of(1L, 2L, 3L)) + .withInviteAs(UserRole.MEMBER) + .inviteExpiresInMinutes(60) + .withNotifyReferrerOnJoin(true) + .withIncludeRealmDefaultSubscriptions(true) + .execute(); + } +} diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/message/ZulipMessageApiTest.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/message/ZulipMessageApiTest.java index 0a1fd076..719a8165 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/message/ZulipMessageApiTest.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/message/ZulipMessageApiTest.java @@ -595,6 +595,52 @@ public void renderMessage() throws Exception { assertEquals("

test

", rendered); } + @Test + public void sendChannelMessageWithChannelId() throws Exception { + Map params = QueryParams.create() + .add(SendMessageApiRequest.CONTENT, "test channel message") + .add(SendMessageApiRequest.LOCAL_ID, "foo") + .add(SendMessageApiRequest.QUEUE_ID, "bar") + .add(SendMessageApiRequest.READ_BY_SENDER, "true") + .add(SendMessageApiRequest.TO, "1") + .add(SendMessageApiRequest.TOPIC, "test topic") + .add(SendMessageApiRequest.TYPE, MessageType.CHANNEL.toString()) + .get(); + + stubZulipResponse(POST, "/messages", params, "sendMessage.json"); + + long messageId = zulip.messages().sendChannelMessage("test channel message", 1, "test topic") + .withLocalId("foo") + .withQueueId("bar") + .withReadBySender(true) + .execute(); + + assertEquals(42, messageId); + } + + @Test + public void sendStreamMessageWithChannelName() throws Exception { + Map params = QueryParams.create() + .add(SendMessageApiRequest.CONTENT, "test channel message") + .add(SendMessageApiRequest.LOCAL_ID, "foo") + .add(SendMessageApiRequest.QUEUE_ID, "bar") + .add(SendMessageApiRequest.READ_BY_SENDER, "true") + .add(SendMessageApiRequest.TO, "test channel") + .add(SendMessageApiRequest.TOPIC, "test topic") + .add(SendMessageApiRequest.TYPE, MessageType.CHANNEL.toString()) + .get(); + + stubZulipResponse(POST, "/messages", params, "sendMessage.json"); + + long messageId = zulip.messages().sendChannelMessage("test channel message", "test channel", "test topic") + .withLocalId("foo") + .withQueueId("bar") + .withReadBySender(true) + .execute(); + + assertEquals(42, messageId); + } + @Test public void sendDirectMessageWithUserIds() throws Exception { Map params = QueryParams.create() diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/server/ZulipServerApiTest.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/server/ZulipServerApiTest.java index 6d02451c..fe9ac090 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/server/ZulipServerApiTest.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/server/ZulipServerApiTest.java @@ -11,18 +11,26 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import com.github.jamesnetherton.zulip.client.ZulipApiTestBase; +import com.github.jamesnetherton.zulip.client.api.server.request.AddApnsDeviceTokenApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.AddCodePlaygroundApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.AddFcmRegistrationTokenApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.AddLinkifierApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.CreateBigBlueButtonVideoCallApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.CreateProfileFieldApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.GetApiKeyApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.RemoveApnsDeviceTokenApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.RemoveFcmRegistrationTokenApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.ReorderLinkifiersApiRequest; import com.github.jamesnetherton.zulip.client.api.server.request.ReorderProfileFieldsApiRequest; +import com.github.jamesnetherton.zulip.client.api.server.request.SendMobilePushTestNotification; import com.github.jamesnetherton.zulip.client.api.server.request.UpdateRealmNewUserDefaultSettingsApiRequest; import com.github.jamesnetherton.zulip.client.api.user.ColorScheme; import com.github.jamesnetherton.zulip.client.api.user.DemoteInactiveStreamOption; import com.github.jamesnetherton.zulip.client.api.user.DesktopIconCountDisplay; import com.github.jamesnetherton.zulip.client.api.user.EmojiSet; import com.github.jamesnetherton.zulip.client.api.user.UserListStyle; +import com.github.jamesnetherton.zulip.client.api.user.WebAnimateImageOption; +import com.github.jamesnetherton.zulip.client.api.user.WebChannelView; import com.github.jamesnetherton.zulip.client.api.user.WebHomeView; import com.github.tomakehurst.wiremock.matching.StringValuePattern; import java.io.File; @@ -141,6 +149,7 @@ public void getServerSettings() throws Exception { assertEquals("https://foo/bar/icon.png", settings.getRealmIcon()); assertEquals("Test Realm Name", settings.getRealmName()); assertEquals("http://localhost:8080", settings.getRealmUri()); + assertEquals("http://localhost:8080", settings.getRealmUrl()); assertEquals("5.6.7", settings.getZulipMergeBase()); assertEquals("1.2.3", settings.getZulipVersion()); assertTrue(settings.isEmailAuthEnabled()); @@ -195,6 +204,11 @@ public void customProfileFields() throws Exception { assertEquals(i, field.getOrder()); assertEquals(ProfileFieldType.fromInt(field.getType().getId()), field.getType()); assertEquals(i == 1, field.isDisplayInProfileSummary()); + if (i == 1) { + assertTrue(field.isRequired()); + } else { + assertFalse(field.isRequired()); + } if (field.getType().equals(ProfileFieldType.LIST_OF_OPTIONS)) { Map> data = (Map>) field.getFieldData(); @@ -248,6 +262,7 @@ public void createSimpleCustomProfileField() throws Exception { .add(CreateProfileFieldApiRequest.HINT, "Test Hint") .add(CreateProfileFieldApiRequest.FIELD_TYPE, "2") .add(CreateProfileFieldApiRequest.DISPLAY_IN_PROFILE_SUMMARY, "true") + .add(CreateProfileFieldApiRequest.REQUIRED, "true") .get(); stubZulipResponse(POST, "/realm/profile_fields", params, "createProfileField.json"); @@ -255,6 +270,7 @@ public void createSimpleCustomProfileField() throws Exception { long id = zulip.server().createCustomProfileField() .withSimpleFieldType(ProfileFieldType.LONG_TEXT, "Test Name", "Test Hint") .withDisplayInProfileSummary(true) + .withRequired(true) .execute(); assertEquals(9, id); @@ -393,6 +409,7 @@ public void updateRealmNewUserDefaultSettings() throws Exception { .add(UpdateRealmNewUserDefaultSettingsApiRequest.PRESENCE_ENABLED, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.REALM_NAME_IN_NOTIFICATIONS, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.REALM_NAME_IN_EMAIL_NOTIFICATIONS_POLICY, "2") + .add(UpdateRealmNewUserDefaultSettingsApiRequest.RECEIVES_TYPING_NOTIFICATIONS, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.SEND_READ_RECEIPTS, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.SEND_PRIVATE_TYPING_NOTIFICATIONS, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.SEND_STREAM_TYPING_NOTIFICATIONS, "true") @@ -400,8 +417,13 @@ public void updateRealmNewUserDefaultSettings() throws Exception { .add(UpdateRealmNewUserDefaultSettingsApiRequest.TRANSLATE_EMOTICONS, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.TWENTY_FOUR_HOUR_TIME, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.USER_LIST_STYLE, "2") + .add(UpdateRealmNewUserDefaultSettingsApiRequest.WEB_ANIMATE_IMAGE_PREVIEWS, "on_hover") + .add(UpdateRealmNewUserDefaultSettingsApiRequest.WEB_CHANNEL_DEFAULT_VIEW, "2") + .add(UpdateRealmNewUserDefaultSettingsApiRequest.WEB_FONT_SIZE_PX, "11") + .add(UpdateRealmNewUserDefaultSettingsApiRequest.WEB_LINE_HEIGHT_PERCENT, "120") .add(UpdateRealmNewUserDefaultSettingsApiRequest.WEB_MARK_READ_ON_SCROLL_POLICY, "2") .add(UpdateRealmNewUserDefaultSettingsApiRequest.WEB_STREAM_UNREADS_COUNT_DISPLAY_POLICY, "2") + .add(UpdateRealmNewUserDefaultSettingsApiRequest.WEB_NAVIGATE_TO_SENT_MESSAGE, "true") .add(UpdateRealmNewUserDefaultSettingsApiRequest.WILDCARD_MENTIONS_NOTIFY, "true") .get(); @@ -446,6 +468,7 @@ public void updateRealmNewUserDefaultSettings() throws Exception { .withPresenceEnabled(true) .withRealmNameInNotifications(true) .withRealmNameInEmailNotifications(RealmNameInNotificationsPolicy.ALWAYS) + .withReceivesTypingNotifications(true) .withSendPrivateTypingNotifications(true) .withSendReadReceipts(true) .withSendStreamTypingNotifications(true) @@ -453,8 +476,13 @@ public void updateRealmNewUserDefaultSettings() throws Exception { .withTranslateEmoticons(true) .withTwentyFourHourTime(true) .withUserListStyle(UserListStyle.WITH_STATUS) + .withWebAnimateImagePreviews(WebAnimateImageOption.ON_HOVER) + .withWebChannelDefaultView(WebChannelView.CHANNEL_FEED) + .withWebFontPx(11) + .withWebLineHeightPercent(120) .withWebMarkReadOnScrollPolicy(MarkReadOnScrollPolicy.CONSERVATION_VIEWS) .withWebStreamUnreadsCountDisplayPolicy(WebStreamUnreadsCountDisplayPolicy.UNMUTED_STREAMS_TOPICS) + .withWebNavigateToSentMessage(true) .withWildcardMentionsNotify(true) .execute(); @@ -463,4 +491,74 @@ public void updateRealmNewUserDefaultSettings() throws Exception { assertEquals("desktop_notifications", result.get(0)); assertEquals("demote_streams", result.get(1)); } + + @Test + public void sendMobilePushTestNotification() throws Exception { + Map params = QueryParams.create() + .add(SendMobilePushTestNotification.TOKEN, "abc123") + .get(); + + stubZulipResponse(POST, "/mobile_push/test_notification", params, SUCCESS_JSON); + + zulip.server().sendMobilePushTestNotification() + .withToken("abc123") + .execute(); + } + + @Test + public void addApnsDeviceToken() throws Exception { + Map params = QueryParams.create() + .add(AddApnsDeviceTokenApiRequest.TOKEN, "abc123") + .add(AddApnsDeviceTokenApiRequest.APP_ID, "456def") + .get(); + + stubZulipResponse(POST, "/users/me/apns_device_token", params, SUCCESS_JSON); + + zulip.server().addApnsDeviceToken("abc123", "456def").execute(); + } + + @Test + public void removeApnsDeviceToken() throws Exception { + Map params = QueryParams.create() + .add(RemoveApnsDeviceTokenApiRequest.TOKEN, "abc123") + .get(); + + stubZulipResponse(DELETE, "/users/me/apns_device_token", params, SUCCESS_JSON); + + zulip.server().removeApnsDeviceToken("abc123").execute(); + } + + @Test + public void addFcmRegistrationToken() throws Exception { + Map params = QueryParams.create() + .add(AddFcmRegistrationTokenApiRequest.TOKEN, "abc123") + .get(); + + stubZulipResponse(POST, "/users/me/android_gcm_reg_id", params, SUCCESS_JSON); + + zulip.server().addFcmRegsitrationToken("abc123").execute(); + } + + @Test + public void removeFcmRegistrationToken() throws Exception { + Map params = QueryParams.create() + .add(RemoveFcmRegistrationTokenApiRequest.TOKEN, "abc123") + .get(); + + stubZulipResponse(DELETE, "/users/me/android_gcm_reg_id", params, SUCCESS_JSON); + + zulip.server().removeFcmRegistrationToken("abc123").execute(); + } + + @Test + public void createBigBlueButtonMeeting() throws Exception { + Map params = QueryParams.create() + .add(CreateBigBlueButtonVideoCallApiRequest.MEETING_NAME, "Test Meeting") + .get(); + + stubZulipResponse(GET, "/calls/bigbluebutton/create", params, "createBigBlueButtonMeeting.json"); + + String url = zulip.server().createBigBlueButtonVideoCall("Test Meeting").execute(); + assertEquals("https://test.com/test/meeting/url", url); + } } diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/stream/ZulipStreamApiTest.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/stream/ZulipStreamApiTest.java index 22dcc434..ede52491 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/stream/ZulipStreamApiTest.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/stream/ZulipStreamApiTest.java @@ -39,7 +39,7 @@ public void getSubscribedStreams() throws Exception { stubZulipResponse(GET, "/users/me/subscriptions", params, "getSubscriptions.json"); - List subscriptions = zulip.streams().getSubscribedStreams() + List subscriptions = zulip.channels().getSubscribedStreams() .withIncludeSubscribers(true) .execute(); @@ -48,6 +48,7 @@ public void getSubscribedStreams() throws Exception { StreamSubscription subscriptionA = subscriptions.get(0); assertTrue(subscriptionA.isAudibleNotifications()); assertEquals("#e79ab5", subscriptionA.getColor()); + assertEquals(1, subscriptionA.getCreatorId()); assertEquals("A Scandinavian country", subscriptionA.getDescription()); assertEquals("

A Scandinavian country

", subscriptionA.getRenderedDescription()); assertTrue(subscriptionA.isDesktopNotifications()); @@ -71,6 +72,7 @@ public void getSubscribedStreams() throws Exception { StreamSubscription subscriptionB = subscriptions.get(1); assertTrue(subscriptionB.isAudibleNotifications()); assertEquals("#e79ab5", subscriptionB.getColor()); + assertEquals(2, subscriptionB.getCreatorId()); assertEquals("

Located in the United Kingdom

", subscriptionB.getRenderedDescription()); assertTrue(subscriptionB.isDesktopNotifications()); assertFalse(subscriptionB.isInviteOnly()); @@ -110,7 +112,7 @@ public void subscribe() throws Exception { stubZulipResponse(POST, "/users/me/subscriptions", params, "subscribe.json"); - StreamSubscriptionResult result = zulip.streams().subscribe( + StreamSubscriptionResult result = zulip.channels().subscribe( StreamSubscriptionRequest.of("foo", "bar"), StreamSubscriptionRequest.of("secret", "stream"), StreamSubscriptionRequest.of("old", "stream"), @@ -169,7 +171,7 @@ public void subscribeWithStringPrincipals() throws Exception { stubZulipResponse(POST, "/users/me/subscriptions", params, "subscribe.json"); - StreamSubscriptionResult result = zulip.streams().subscribe( + StreamSubscriptionResult result = zulip.channels().subscribe( StreamSubscriptionRequest.of("foo", "bar"), StreamSubscriptionRequest.of("secret", "stream"), StreamSubscriptionRequest.of("old", "stream"), @@ -218,7 +220,7 @@ public void unsubscribe() throws Exception { stubZulipResponse(DELETE, "/users/me/subscriptions", params, "unsubscribe.json"); - StreamUnsubscribeResult result = zulip.streams().unsubscribe("foo", "bar") + StreamUnsubscribeResult result = zulip.channels().unsubscribe("foo", "bar") .withPrincipals(1, 2, 3) .execute(); @@ -242,7 +244,7 @@ public void unsubscribeWithStringPrincipals() throws Exception { stubZulipResponse(DELETE, "/users/me/subscriptions", params, "unsubscribe.json"); - StreamUnsubscribeResult result = zulip.streams().unsubscribe("foo", "bar") + StreamUnsubscribeResult result = zulip.channels().unsubscribe("foo", "bar") .withPrincipals("test@test.com", "foo@bar.com") .execute(); @@ -261,7 +263,7 @@ public void unsubscribeWithStringPrincipals() throws Exception { public void subscriptionStatus() throws Exception { stubZulipResponse(GET, "/users/1/subscriptions/2", "subscriptionStatus.json"); - assertTrue(zulip.streams().isSubscribed(1, 2).execute()); + assertTrue(zulip.channels().isSubscribed(1, 2).execute()); } @Test @@ -272,7 +274,7 @@ public void getStreamId() throws Exception { stubZulipResponse(GET, "/get_stream_id", params, "streamId.json"); - Long streamId = zulip.streams().getStreamId("foo").execute(); + Long streamId = zulip.channels().getStreamId("foo").execute(); assertEquals(15, streamId); } @@ -281,14 +283,14 @@ public void getStreamId() throws Exception { public void delete() throws Exception { stubZulipResponse(DELETE, "/streams/1", SUCCESS_JSON); - zulip.streams().delete(1).execute(); + zulip.channels().delete(1).execute(); } @Test public void streamTopics() throws Exception { stubZulipResponse(GET, "/users/me/1/topics", "streamTopics.json"); - List topics = zulip.streams().getTopics(1).execute(); + List topics = zulip.channels().getTopics(1).execute(); for (int i = 1; i <= topics.size(); i++) { Topic topic = topics.get(i - 1); @@ -313,7 +315,7 @@ public void updateStream() throws Exception { stubZulipResponse(PATCH, "/streams/1", params); - zulip.streams().updateStream(1) + zulip.channels().updateStream(1) .withCanRemoveSubscribersGroup(99) .withDescription("New description") .withHistoryPublicToSubscribers(true) @@ -339,7 +341,7 @@ public void updateStreamWithMessageRetentionPolicy() throws Exception { stubZulipResponse(PATCH, "/streams/1", params); - zulip.streams().updateStream(1) + zulip.channels().updateStream(1) .withDescription("New description") .withHistoryPublicToSubscribers(true) .withMessageRetention(RetentionPolicy.UNLIMITED) @@ -362,7 +364,7 @@ public void getAll() throws Exception { stubZulipResponse(GET, "/streams", params, "streams.json"); - List streams = zulip.streams().getAll() + List streams = zulip.channels().getAll() .withIncludeAllActive(true) .withIncludeDefault(true) .withOwnerSubscribed(true) @@ -375,6 +377,7 @@ public void getAll() throws Exception { Stream stream = streams.get(i - 1); assertEquals("Test Stream Description " + i, stream.getDescription()); assertEquals("

Test Stream Description " + i + "

", stream.getRenderedDescription()); + assertEquals(i, stream.getCreatorId()); assertTrue(stream.getDateCreated().toEpochMilli() > 0); assertTrue(stream.isInviteOnly()); assertEquals("Test Stream Name " + i, stream.getName()); @@ -399,9 +402,10 @@ public void getAll() throws Exception { public void getStreamById() throws Exception { stubZulipResponse(GET, "/streams/1", "getStreamById.json"); - Stream stream = zulip.streams().getStream(1).execute(); + Stream stream = zulip.channels().getStream(1).execute(); assertEquals("Test Stream Description", stream.getDescription()); assertEquals("

Test Stream Description

", stream.getRenderedDescription()); + assertEquals(1, stream.getCreatorId()); assertTrue(stream.getDateCreated().toEpochMilli() > 0); assertTrue(stream.isInviteOnly()); assertEquals("Test Stream Name", stream.getName()); @@ -426,7 +430,7 @@ public void muteTopic() throws Exception { stubZulipResponse(PATCH, "/users/me/subscriptions/muted_topics", params); - zulip.streams().muteTopic("Test Topic") + zulip.channels().muteTopic("Test Topic") .withStream("Test Stream") .withStreamId(1) .execute(); @@ -443,7 +447,7 @@ public void unmuteTopic() throws Exception { stubZulipResponse(PATCH, "/users/me/subscriptions/muted_topics", params); - zulip.streams().unmuteTopic("Test Topic") + zulip.channels().unmuteTopic("Test Topic") .withStream("Test Stream") .withStreamId(1) .execute(); @@ -476,7 +480,7 @@ public void updateSubscriptionSettings() throws Exception { stubZulipResponse(POST, "/users/me/subscriptions/properties", params, "subscriptionSettings.json"); - List result = zulip.streams().updateSubscriptionSettings() + List result = zulip.channels().updateSubscriptionSettings() .withColor(1, "#000000") .withAudibleNotifications(1, true) .withDesktopNotifications(1, true) @@ -504,11 +508,11 @@ public void updateUserTopicPreferences() throws Exception { stubZulipResponse(POST, "/user_topics", params); - zulip.streams().updateUserTopicPreferences(1, "Test Topic", TopicVisibilityPolicy.MUTED).execute(); + zulip.channels().updateUserTopicPreferences(1, "Test Topic", TopicVisibilityPolicy.MUTED).execute(); } @Test - public void deleteTopic() throws Exception { + public void deleteTopicPartiallyCompleted() throws Exception { Map params = QueryParams.create() .add(DeleteTopicApiRequest.TOPIC_NAME, "Test Topic") .get(); @@ -516,16 +520,34 @@ public void deleteTopic() throws Exception { String scenarioName = "deleteTopicPartiallyCompleted"; stubZulipResponse(POST, "/streams/1/delete_topic", params, "deleteTopicPartiallyCompleted.json", scenarioName, STARTED, "retry"); - stubZulipResponse(POST, "/streams/1/delete_topic", params, SUCCESS_JSON, scenarioName, "retry", "success"); + stubZulipResponse(POST, "/streams/1/delete_topic", params, "deleteTopicIncomplete.json", scenarioName, "retry", + "incomplete"); + stubZulipResponse(POST, "/streams/1/delete_topic", params, "deleteTopicComplete.json", scenarioName, "incomplete", + "success"); + + zulip.channels().deleteTopic(1, "Test Topic").execute(); + } + + @Test + public void deleteTopic() throws Exception { + Map params = QueryParams.create() + .add(DeleteTopicApiRequest.TOPIC_NAME, "Test Topic") + .get(); + + String scenarioName = "deleteTopic"; + stubZulipResponse(POST, "/streams/1/delete_topic", params, "deleteTopicIncomplete.json", scenarioName, STARTED, + "retry"); + stubZulipResponse(POST, "/streams/1/delete_topic", params, "deleteTopicComplete.json", scenarioName, "retry", + "success"); - zulip.streams().deleteTopic(1, "Test Topic").execute(); + zulip.channels().deleteTopic(1, "Test Topic").execute(); } @Test public void archiveStream() throws Exception { stubZulipResponse(DELETE, "/streams/1", Collections.emptyMap()); - zulip.streams().archiveStream(1).execute(); + zulip.channels().archiveStream(1).execute(); } @Test @@ -536,7 +558,7 @@ public void addDefaultStream() throws Exception { stubZulipResponse(POST, "/default_streams", params); - zulip.streams().addDefaultStream(1).execute(); + zulip.channels().addDefaultStream(1).execute(); } @Test @@ -547,14 +569,14 @@ public void removeDefaultStream() throws Exception { stubZulipResponse(DELETE, "/default_streams", params); - zulip.streams().removeDefaultStream(1).execute(); + zulip.channels().removeDefaultStream(1).execute(); } @Test public void streamSubscribers() throws Exception { stubZulipResponse(GET, "/streams/1/members", Collections.emptyMap(), "streamSubscribers.json"); - List streamSubscribers = zulip.streams().getStreamSubscribers(1).execute(); + List streamSubscribers = zulip.channels().getStreamSubscribers(1).execute(); assertEquals(2, streamSubscribers.size()); assertEquals(5, streamSubscribers.get(0)); assertEquals(6, streamSubscribers.get(1)); @@ -564,7 +586,7 @@ public void streamSubscribers() throws Exception { public void getStreamEmailAddress() throws Exception { stubZulipResponse(GET, "/streams/1/email_address", Collections.emptyMap(), "streamEmailAddress.json"); - String email = zulip.streams().getStreamEmailAddress(1).execute(); + String email = zulip.channels().getStreamEmailAddress(1).execute(); assertEquals("test@test.com", email); } } diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/api/user/ZulipUserApiTest.java b/src/test/java/com/github/jamesnetherton/zulip/client/api/user/ZulipUserApiTest.java index 7ed3698c..62d32712 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/api/user/ZulipUserApiTest.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/api/user/ZulipUserApiTest.java @@ -9,6 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -29,16 +30,20 @@ import com.github.jamesnetherton.zulip.client.api.user.request.RemoveUsersFromGroupApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.SetTypingStatusApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateNotificationSettingsApiRequest; +import com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserPresenceApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserSettingsApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateOwnUserStatusApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateUserApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateUserGroupApiRequest; import com.github.jamesnetherton.zulip.client.api.user.request.UpdateUserGroupSubGroupsApiRequest; +import com.github.jamesnetherton.zulip.client.util.JsonUtils; import com.github.tomakehurst.wiremock.matching.StringValuePattern; import java.util.Collections; import java.util.List; import java.util.Map; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; public class ZulipUserApiTest extends ZulipApiTestBase { @@ -124,13 +129,14 @@ public void updateUserGroup() throws Exception { Map params = QueryParams.create() .add(UpdateUserGroupApiRequest.NAME, "New Group Name") .add(UpdateUserGroupApiRequest.DESCRIPTION, "New Group Description") - .add(UpdateUserGroupApiRequest.CAN_MENTION_GROUP, "1") + .add(UpdateUserGroupApiRequest.CAN_MENTION_GROUP, + JsonUtils.getMapper().writeValueAsString(Map.of("old", 1, "new", 2))) .get(); stubZulipResponse(PATCH, "/user_groups/3", params); zulip.users().updateUserGroup("New Group Name", "New Group Description", 3) - .withCanMentionGroup(1) + .withCanMentionGroup(1, 2) .execute(); } @@ -456,6 +462,29 @@ public void userPresence() throws Exception { assertEquals(UserPresenceStatus.IDLE, detailB.getStatus()); } + @Test + public void allUserPresence() throws Exception { + stubZulipResponse(GET, "/realm/presence", "getAllUserPresence.json"); + + Map> presences = zulip.users().getAllUserPresence().execute(); + Map userPresenceDetail = presences.get("test@test.com"); + assertNotNull(userPresenceDetail); + + UserPresenceDetail websiteUserPresence = userPresenceDetail.get("website"); + assertNotNull(websiteUserPresence); + assertEquals(websiteUserPresence.getStatus(), UserPresenceStatus.ACTIVE); + assertEquals(websiteUserPresence.getClient(), "website"); + assertTrue(websiteUserPresence.getTimestamp().toEpochMilli() > 0); + assertTrue(websiteUserPresence.isPushable()); + + UserPresenceDetail aggregatedUserPresence = userPresenceDetail.get("aggregated"); + assertNotNull(aggregatedUserPresence); + assertEquals(aggregatedUserPresence.getStatus(), UserPresenceStatus.ACTIVE); + assertEquals(aggregatedUserPresence.getClient(), "website"); + assertTrue(aggregatedUserPresence.getTimestamp().toEpochMilli() > 0); + assertFalse(aggregatedUserPresence.isPushable()); + } + @Test public void attachments() throws Exception { stubZulipResponse(GET, "/attachments", "getUserAttachments.json"); @@ -481,6 +510,39 @@ public void attachments() throws Exception { assertEquals(1603913066000L, messageB.getDateSent().toEpochMilli()); } + @ParameterizedTest + @EnumSource(value = UserPresenceStatus.class, names = { "ACTIVE", "IDLE" }) + public void updateOwnUserPresence(UserPresenceStatus status) throws Exception { + Map params = QueryParams.create() + .add(UpdateOwnUserPresenceApiRequest.LAST_UPDATE_ID, "-1") + .add(UpdateOwnUserPresenceApiRequest.NEW_USER_INPUT, "true") + .add(UpdateOwnUserPresenceApiRequest.PING_ONLY, "true") + .add(UpdateOwnUserPresenceApiRequest.STATUS, status.name().toLowerCase()) + .get(); + + stubZulipResponse(POST, "/users/me/presence", params, "updateOwnUserPresence.json"); + + assertThrows(IllegalArgumentException.class, () -> { + zulip.users().updateOwnUserPresence(UserPresenceStatus.OFFLINE).execute(); + }); + + Map userPresenceDetails = zulip.users().updateOwnUserPresence(status) + .withNewUserInput(true) + .withPingOnly(true) + .execute(); + UserPresenceDetail userPresenceDetail = userPresenceDetails.get(1L); + assertNotNull(userPresenceDetail); + assertTrue(userPresenceDetail.getActiveTimestamp().toEpochMilli() > 0); + assertTrue(userPresenceDetail.getIdleTimestamp().toEpochMilli() > 0); + } + + @Test + public void deleteAttachment() throws Exception { + stubZulipResponse(DELETE, "/attachments/1", SUCCESS_JSON); + + zulip.users().deleteAttachment(1).execute(); + } + @Test public void muteUser() throws Exception { stubZulipResponse(POST, "/users/me/muted_users/5", Collections.emptyMap()); @@ -558,6 +620,7 @@ public void updateOwnUserSettings() throws Exception { .add(UpdateOwnUserSettingsApiRequest.PRESENCE_ENABLED, "true") .add(UpdateOwnUserSettingsApiRequest.REALM_NAME_IN_NOTIFICATIONS, "true") .add(UpdateOwnUserSettingsApiRequest.REALM_NAME_IN_EMAIL_NOTIFICATIONS_POLICY, "2") + .add(UpdateOwnUserSettingsApiRequest.RECEIVES_TYPING_NOTIFICATIONS, "true") .add(UpdateOwnUserSettingsApiRequest.SEND_PRIVATE_TYPING_NOTIFICATIONS, "true") .add(UpdateOwnUserSettingsApiRequest.SEND_READ_RECEIPTS, "true") .add(UpdateOwnUserSettingsApiRequest.SEND_STREAM_TYPING_NOTIFICATIONS, "true") @@ -566,7 +629,12 @@ public void updateOwnUserSettings() throws Exception { .add(UpdateOwnUserSettingsApiRequest.TRANSLATE_EMOTICONS, "true") .add(UpdateOwnUserSettingsApiRequest.TWENTY_FOUR_HOUR_TIME, "true") .add(UpdateOwnUserSettingsApiRequest.USER_LIST_STYLE, "2") + .add(UpdateOwnUserSettingsApiRequest.WEB_ANIMATE_IMAGE_PREVIEWS, "on_hover") + .add(UpdateOwnUserSettingsApiRequest.WEB_CHANNEL_DEFAULT_VIEW, "2") + .add(UpdateOwnUserSettingsApiRequest.WEB_FONT_SIZE_PX, "11") + .add(UpdateOwnUserSettingsApiRequest.WEB_LINE_HEIGHT_PERCENT, "120") .add(UpdateOwnUserSettingsApiRequest.WEB_MARK_READ_ON_SCROLL_POLICY, "2") + .add(UpdateOwnUserSettingsApiRequest.WEB_NAVIGATE_TO_SENT_MESSAGE, "true") .add(UpdateOwnUserSettingsApiRequest.WILDCARD_MENTIONS_NOTIFY, "true") .get(); @@ -609,6 +677,7 @@ public void updateOwnUserSettings() throws Exception { .withPresenceEnabled(true) .withRealmNameInNotifications(true) .withRealmNameInEmailNotifications(RealmNameInNotificationsPolicy.ALWAYS) + .withReceivesTypingNotifications(true) .withSendPrivateTypingNotifications(true) .withSendReadReceipts(true) .withSendStreamTypingNotifications(true) @@ -617,7 +686,12 @@ public void updateOwnUserSettings() throws Exception { .withTranslateEmoticons(true) .withTwentyFourHourTime(true) .withUserListStyle(UserListStyle.WITH_STATUS) + .withWebAnimateImagePreviews(WebAnimateImageOption.ON_HOVER) + .withWebChannelDefaultView(WebChannelView.CHANNEL_FEED) + .withWebFontPx(11) + .withWebLineHeightPercent(120) .withWebMarkReadOnScrollPolicy(MarkReadOnScrollPolicy.CONSERVATION_VIEWS) + .withWebNavigateToSentMessage(true) .withWildcardMentionsNotify(true) .execute(); @@ -732,4 +806,16 @@ public void removeAlertWords() throws Exception { assertEquals(1, alertWords.size()); assertTrue(alertWords.contains("bar")); } + + @Test + public void getUserStatus() throws Exception { + stubZulipResponse(GET, "/users/1/status", "getUserStatus.json"); + + UserStatus userStatus = zulip.users().getUserStatus(1).execute(); + assertFalse(userStatus.isAway()); + assertEquals("on vacation", userStatus.getStatusText()); + assertEquals("1f697", userStatus.getEmojiCode()); + assertEquals("car", userStatus.getEmojiName()); + assertEquals(ReactionType.UNICODE, userStatus.getReactionType()); + } } diff --git a/src/test/java/com/github/jamesnetherton/zulip/client/generator/EmojiEnumGenerator.java b/src/test/java/com/github/jamesnetherton/zulip/client/generator/EmojiEnumGenerator.java index 81bd3043..b5e75b29 100644 --- a/src/test/java/com/github/jamesnetherton/zulip/client/generator/EmojiEnumGenerator.java +++ b/src/test/java/com/github/jamesnetherton/zulip/client/generator/EmojiEnumGenerator.java @@ -19,7 +19,7 @@ public class EmojiEnumGenerator { private static final String ENUM_VALUE_INDENT = " ".repeat(4); - private static final String ZULIP_EMOJI_JSON = "https://raw.githubusercontent.com/zulip/zulip/8.0/tools/setup/emoji/emoji_map.json"; + private static final String ZULIP_EMOJI_JSON = "https://raw.githubusercontent.com/zulip/zulip/9.0/tools/setup/emoji/emoji_map.json"; private static final Path ZULIP_ENUM_JAVA = Paths .get("src/main/java/com/github/jamesnetherton/zulip/client/api/message/Emoji.java"); diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/invitation/createInvitationLink.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/invitation/createInvitationLink.json new file mode 100644 index 00000000..edb3c195 --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/invitation/createInvitationLink.json @@ -0,0 +1,5 @@ +{ + "invite_link": "https://example.zulipchat.com/join/yddhtzk4jgl7rsmazc5fyyyy/", + "msg": "", + "result": "success" +} diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/invitation/getAllInvitations.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/invitation/getAllInvitations.json new file mode 100644 index 00000000..28c9de0e --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/invitation/getAllInvitations.json @@ -0,0 +1,28 @@ +{ + "invites": [ + { + "email": "example@zulip.com", + "expiry_date": 1710606654, + "id": 1, + "invited": 1710606654, + "invited_as": 100, + "invited_by_user_id": 1, + "is_multiuse": true, + "link_url": "https://example.zulipchat.com/join/1/", + "notify_referrer_on_join": true + }, + { + "email": "example@zulip.com", + "expiry_date": 1710606654, + "id": 2, + "invited": 1710606654, + "invited_as": 200, + "invited_by_user_id": 2, + "is_multiuse": true, + "link_url": "https://example.zulipchat.com/join/2/", + "notify_referrer_on_join": true + } + ], + "msg": "", + "result": "success" +} diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/message/fileUpload.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/message/fileUpload.json index 96967de7..e985b1bc 100644 --- a/src/test/resources/com/github/jamesnetherton/zulip/client/api/message/fileUpload.json +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/message/fileUpload.json @@ -1,5 +1,5 @@ { "msg": "", "result": "success", - "uri": "/user_uploads/1/4e/m2A3MSqFnWRLUf9SaPzQ0Up_/zulip.txt" + "url": "/user_uploads/1/4e/m2A3MSqFnWRLUf9SaPzQ0Up_/zulip.txt" } diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/createBigBlueButtonMeeting.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/createBigBlueButtonMeeting.json new file mode 100644 index 00000000..83b340cd --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/createBigBlueButtonMeeting.json @@ -0,0 +1,5 @@ +{ + "msg": "", + "result": "success", + "url": "https://test.com/test/meeting/url" +} diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getCustomProfileFields.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getCustomProfileFields.json index 7f1295de..5f044420 100644 --- a/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getCustomProfileFields.json +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getCustomProfileFields.json @@ -7,7 +7,8 @@ "name": "Field 1", "order": 1, "type": 1, - "display_in_profile_summary": true + "display_in_profile_summary": true, + "required": true }, { "field_data": "Data 2", @@ -15,7 +16,8 @@ "id": 2, "name": "Field 2", "order": 2, - "type": 2 + "type": 2, + "required": false }, { "field_data": "{\"vim\":{\"text\":\"Vim\",\"order\":\"1\"},\"emacs\":{\"text\":\"Emacs\",\"order\":\"2\"}}", diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getServerSettings.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getServerSettings.json index ba25cb9c..1379ed4c 100644 --- a/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getServerSettings.json +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/server/getServerSettings.json @@ -41,6 +41,7 @@ "realm_icon": "https://foo/bar/icon.png", "realm_name": "Test Realm Name", "realm_uri": "http://localhost:8080", + "realm_url": "http://localhost:8080", "realm_web_public_access_enabled": true, "require_email_format_usernames": true, "result": "success", diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/deleteTopicComplete.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/deleteTopicComplete.json new file mode 100644 index 00000000..2376a13e --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/deleteTopicComplete.json @@ -0,0 +1,5 @@ +{ + "complete": true, + "msg": "", + "result": "success" +} diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/deleteTopicIncomplete.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/deleteTopicIncomplete.json new file mode 100644 index 00000000..57c9a258 --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/deleteTopicIncomplete.json @@ -0,0 +1,5 @@ +{ + "complete": false, + "msg": "", + "result": "success" +} diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getStreamById.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getStreamById.json index 4e7a31aa..c63421a4 100644 --- a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getStreamById.json +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getStreamById.json @@ -3,6 +3,7 @@ "result": "success", "stream": { "can_remove_subscribers_group": 1, + "creator_id": 1, "description": "Test Stream Description", "first_message_id": 1, "history_public_to_subscribers": true, diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getSubscriptions.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getSubscriptions.json index 5bd5d34e..42c547f4 100644 --- a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getSubscriptions.json +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/getSubscriptions.json @@ -5,6 +5,7 @@ { "audible_notifications": true, "color": "#e79ab5", + "creator_id": 1, "description": "A Scandinavian country", "rendered_description": "

A Scandinavian country

", "desktop_notifications": true, @@ -35,6 +36,7 @@ { "audible_notifications": true, "color": "#e79ab5", + "creator_id": 2, "description": "Located in the United Kingdom", "rendered_description": "

Located in the United Kingdom

", "desktop_notifications": true, diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/streams.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/streams.json index ac40e29c..c973bb25 100644 --- a/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/streams.json +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/stream/streams.json @@ -3,6 +3,7 @@ "result": "success", "streams": [ { + "creator_id": 1, "description": "Test Stream Description 1", "date_created": 1603913066, "rendered_description": "

Test Stream Description 1<\/p>", @@ -20,6 +21,7 @@ "stream_weekly_traffic": 1 }, { + "creator_id": 2, "description": "Test Stream Description 2", "date_created": 1603913066, "rendered_description": "

Test Stream Description 2<\/p>", @@ -37,6 +39,7 @@ "stream_weekly_traffic": 2 }, { + "creator_id": 3, "description": "Test Stream Description 3", "date_created": 1603913066, "rendered_description": "

Test Stream Description 3<\/p>", diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/getAllUserPresence.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/getAllUserPresence.json new file mode 100644 index 00000000..5318549a --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/getAllUserPresence.json @@ -0,0 +1,20 @@ +{ + "msg": "", + "presences": { + "test@test.com": { + "aggregated": { + "client": "website", + "status": "active", + "timestamp": 1656958485 + }, + "website": { + "client": "website", + "pushable": true, + "status": "active", + "timestamp": 1656958485 + } + } + }, + "result": "success", + "server_timestamp": 1656958539.6287155 +} diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/getUserStatus.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/getUserStatus.json new file mode 100644 index 00000000..191868c2 --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/getUserStatus.json @@ -0,0 +1,10 @@ +{ + "msg": "", + "result": "success", + "status": { + "emoji_code": "1f697", + "emoji_name": "car", + "reaction_type": "unicode_emoji", + "status_text": "on vacation" + } +} diff --git a/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/updateOwnUserPresence.json b/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/updateOwnUserPresence.json new file mode 100644 index 00000000..c331e808 --- /dev/null +++ b/src/test/resources/com/github/jamesnetherton/zulip/client/api/user/updateOwnUserPresence.json @@ -0,0 +1,12 @@ +{ + "msg": "", + "presence_last_update_id": 1000, + "presences": { + "1": { + "active_timestamp": 1656958520, + "idle_timestamp": 1656958530 + } + }, + "result": "success", + "server_timestamp": 1656958539.6287155 +} diff --git a/src/test/resources/docker/createrealm.sh b/src/test/resources/docker/createrealm.sh new file mode 100755 index 00000000..d84cdeb7 --- /dev/null +++ b/src/test/resources/docker/createrealm.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker compose exec -u zulip zulip /home/zulip/deployments/current/manage.py generate_realm_creation_link diff --git a/src/test/resources/docker/createzuliprc.sh b/src/test/resources/docker/createzuliprc.sh new file mode 100755 index 00000000..cc50f793 --- /dev/null +++ b/src/test/resources/docker/createzuliprc.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +API_KEY=$(curl -k -s -S -X POST --data-urlencode 'username=test@test.com' --data-urlencode 'password=testing123' https://localhost/api/v1/fetch_api_key | jq -r '.api_key') + +echo "key=${API_KEY}\nemail=test@test.com\nsite=https://localhost\ninsecure=true" > ../../../../zuliprc diff --git a/src/test/resources/docker/docker-compose.yml b/src/test/resources/docker/docker-compose.yml index 6c9beb2d..0dde5a86 100644 --- a/src/test/resources/docker/docker-compose.yml +++ b/src/test/resources/docker/docker-compose.yml @@ -1,4 +1,3 @@ -version: '2' services: database: image: 'zulip/zulip-postgresql:14' @@ -42,7 +41,7 @@ services: environment: REDIS_PASSWORD: 'REPLACE_WITH_SECURE_REDIS_PASSWORD' zulip: - image: 'zulip/docker-zulip:8.4-0' + image: 'zulip/docker-zulip:9.1-0' ports: - '80:80' - '443:443' diff --git a/src/test/resources/docker/enablecreateuser.sh b/src/test/resources/docker/enablecreateuser.sh new file mode 100755 index 00000000..72a4a0f6 --- /dev/null +++ b/src/test/resources/docker/enablecreateuser.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd $(dirname $(find /home/zulip/deployments -name manage.py)) +su zulip -c './manage.py change_user_role test@test.com can_create_users --realm=2' diff --git a/src/test/resources/docker/zulip.sql b/src/test/resources/docker/zulip.sql index 835fb3f0..05f63048 100644 --- a/src/test/resources/docker/zulip.sql +++ b/src/test/resources/docker/zulip.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 14.1 --- Dumped by pg_dump version 14.1 +-- Dumped from database version 14.10 +-- Dumped by pg_dump version 14.10 SET statement_timeout = 0; SET lock_timeout = 0; @@ -163,7 +163,7 @@ SET default_table_access_method = heap; -- CREATE TABLE zulip.analytics_fillstate ( - id integer NOT NULL, + id bigint NOT NULL, property character varying(40) NOT NULL, end_time timestamp with time zone NOT NULL, state smallint NOT NULL, @@ -177,22 +177,14 @@ ALTER TABLE zulip.analytics_fillstate OWNER TO zulip; -- Name: analytics_fillstate_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.analytics_fillstate_id_seq - AS integer +ALTER TABLE zulip.analytics_fillstate ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.analytics_fillstate_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.analytics_fillstate_id_seq OWNER TO zulip; - --- --- Name: analytics_fillstate_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.analytics_fillstate_id_seq OWNED BY zulip.analytics_fillstate.id; + CACHE 1 +); -- @@ -200,7 +192,7 @@ ALTER SEQUENCE zulip.analytics_fillstate_id_seq OWNED BY zulip.analytics_fillsta -- CREATE TABLE zulip.analytics_installationcount ( - id integer NOT NULL, + id bigint NOT NULL, property character varying(32) NOT NULL, end_time timestamp with time zone NOT NULL, value bigint NOT NULL, @@ -214,22 +206,14 @@ ALTER TABLE zulip.analytics_installationcount OWNER TO zulip; -- Name: analytics_installationcount_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.analytics_installationcount_id_seq - AS integer +ALTER TABLE zulip.analytics_installationcount ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.analytics_installationcount_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.analytics_installationcount_id_seq OWNER TO zulip; - --- --- Name: analytics_installationcount_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.analytics_installationcount_id_seq OWNED BY zulip.analytics_installationcount.id; + CACHE 1 +); -- @@ -237,7 +221,7 @@ ALTER SEQUENCE zulip.analytics_installationcount_id_seq OWNED BY zulip.analytics -- CREATE TABLE zulip.analytics_realmcount ( - id integer NOT NULL, + id bigint NOT NULL, realm_id integer NOT NULL, property character varying(32) NOT NULL, end_time timestamp with time zone NOT NULL, @@ -252,22 +236,14 @@ ALTER TABLE zulip.analytics_realmcount OWNER TO zulip; -- Name: analytics_realmcount_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.analytics_realmcount_id_seq - AS integer +ALTER TABLE zulip.analytics_realmcount ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.analytics_realmcount_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.analytics_realmcount_id_seq OWNER TO zulip; - --- --- Name: analytics_realmcount_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.analytics_realmcount_id_seq OWNED BY zulip.analytics_realmcount.id; + CACHE 1 +); -- @@ -275,9 +251,9 @@ ALTER SEQUENCE zulip.analytics_realmcount_id_seq OWNED BY zulip.analytics_realmc -- CREATE TABLE zulip.analytics_streamcount ( - id integer NOT NULL, + id bigint NOT NULL, realm_id integer NOT NULL, - stream_id integer NOT NULL, + stream_id bigint NOT NULL, property character varying(32) NOT NULL, end_time timestamp with time zone NOT NULL, value bigint NOT NULL, @@ -291,22 +267,14 @@ ALTER TABLE zulip.analytics_streamcount OWNER TO zulip; -- Name: analytics_streamcount_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.analytics_streamcount_id_seq - AS integer +ALTER TABLE zulip.analytics_streamcount ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.analytics_streamcount_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.analytics_streamcount_id_seq OWNER TO zulip; - --- --- Name: analytics_streamcount_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.analytics_streamcount_id_seq OWNED BY zulip.analytics_streamcount.id; + CACHE 1 +); -- @@ -314,7 +282,7 @@ ALTER SEQUENCE zulip.analytics_streamcount_id_seq OWNED BY zulip.analytics_strea -- CREATE TABLE zulip.analytics_usercount ( - id integer NOT NULL, + id bigint NOT NULL, realm_id integer NOT NULL, user_id integer NOT NULL, property character varying(32) NOT NULL, @@ -330,22 +298,14 @@ ALTER TABLE zulip.analytics_usercount OWNER TO zulip; -- Name: analytics_usercount_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.analytics_usercount_id_seq - AS integer +ALTER TABLE zulip.analytics_usercount ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.analytics_usercount_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.analytics_usercount_id_seq OWNER TO zulip; - --- --- Name: analytics_usercount_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.analytics_usercount_id_seq OWNED BY zulip.analytics_usercount.id; + CACHE 1 +); -- @@ -364,22 +324,14 @@ ALTER TABLE zulip.auth_group OWNER TO zulip; -- Name: auth_group_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.auth_group_id_seq - AS integer +ALTER TABLE zulip.auth_group ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.auth_group_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.auth_group_id_seq OWNER TO zulip; - --- --- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.auth_group_id_seq OWNED BY zulip.auth_group.id; + CACHE 1 +); -- @@ -387,7 +339,7 @@ ALTER SEQUENCE zulip.auth_group_id_seq OWNED BY zulip.auth_group.id; -- CREATE TABLE zulip.auth_group_permissions ( - id integer NOT NULL, + id bigint NOT NULL, group_id integer NOT NULL, permission_id integer NOT NULL ); @@ -399,22 +351,14 @@ ALTER TABLE zulip.auth_group_permissions OWNER TO zulip; -- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.auth_group_permissions_id_seq - AS integer +ALTER TABLE zulip.auth_group_permissions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.auth_group_permissions_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.auth_group_permissions_id_seq OWNER TO zulip; - --- --- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.auth_group_permissions_id_seq OWNED BY zulip.auth_group_permissions.id; + CACHE 1 +); -- @@ -435,22 +379,14 @@ ALTER TABLE zulip.auth_permission OWNER TO zulip; -- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.auth_permission_id_seq - AS integer +ALTER TABLE zulip.auth_permission ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.auth_permission_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.auth_permission_id_seq OWNER TO zulip; - --- --- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.auth_permission_id_seq OWNED BY zulip.auth_permission.id; + CACHE 1 +); -- @@ -458,7 +394,7 @@ ALTER SEQUENCE zulip.auth_permission_id_seq OWNED BY zulip.auth_permission.id; -- CREATE TABLE zulip.confirmation_confirmation ( - id integer NOT NULL, + id bigint NOT NULL, object_id integer NOT NULL, date_sent timestamp with time zone NOT NULL, confirmation_key character varying(40) NOT NULL, @@ -477,22 +413,14 @@ ALTER TABLE zulip.confirmation_confirmation OWNER TO zulip; -- Name: confirmation_confirmation_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.confirmation_confirmation_id_seq - AS integer +ALTER TABLE zulip.confirmation_confirmation ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.confirmation_confirmation_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.confirmation_confirmation_id_seq OWNER TO zulip; - --- --- Name: confirmation_confirmation_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.confirmation_confirmation_id_seq OWNED BY zulip.confirmation_confirmation.id; + CACHE 1 +); -- @@ -500,7 +428,7 @@ ALTER SEQUENCE zulip.confirmation_confirmation_id_seq OWNED BY zulip.confirmatio -- CREATE TABLE zulip.confirmation_realmcreationkey ( - id integer NOT NULL, + id bigint NOT NULL, creation_key character varying(40) NOT NULL, date_created timestamp with time zone NOT NULL, presume_email_valid boolean NOT NULL @@ -513,22 +441,14 @@ ALTER TABLE zulip.confirmation_realmcreationkey OWNER TO zulip; -- Name: confirmation_realmcreationkey_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.confirmation_realmcreationkey_id_seq - AS integer +ALTER TABLE zulip.confirmation_realmcreationkey ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.confirmation_realmcreationkey_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.confirmation_realmcreationkey_id_seq OWNER TO zulip; - --- --- Name: confirmation_realmcreationkey_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.confirmation_realmcreationkey_id_seq OWNED BY zulip.confirmation_realmcreationkey.id; + CACHE 1 +); -- @@ -548,22 +468,14 @@ ALTER TABLE zulip.django_content_type OWNER TO zulip; -- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.django_content_type_id_seq - AS integer +ALTER TABLE zulip.django_content_type ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.django_content_type_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.django_content_type_id_seq OWNER TO zulip; - --- --- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.django_content_type_id_seq OWNED BY zulip.django_content_type.id; + CACHE 1 +); -- @@ -571,7 +483,7 @@ ALTER SEQUENCE zulip.django_content_type_id_seq OWNED BY zulip.django_content_ty -- CREATE TABLE zulip.django_migrations ( - id integer NOT NULL, + id bigint NOT NULL, app character varying(255) NOT NULL, name character varying(255) NOT NULL, applied timestamp with time zone NOT NULL @@ -584,22 +496,14 @@ ALTER TABLE zulip.django_migrations OWNER TO zulip; -- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.django_migrations_id_seq - AS integer +ALTER TABLE zulip.django_migrations ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.django_migrations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.django_migrations_id_seq OWNER TO zulip; - --- --- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.django_migrations_id_seq OWNED BY zulip.django_migrations.id; + CACHE 1 +); -- @@ -620,7 +524,7 @@ ALTER TABLE zulip.django_session OWNER TO zulip; -- CREATE TABLE zulip.fts_update_log ( - id integer NOT NULL, + id bigint NOT NULL, message_id integer NOT NULL ); @@ -632,7 +536,6 @@ ALTER TABLE zulip.fts_update_log OWNER TO zulip; -- CREATE SEQUENCE zulip.fts_update_log_id_seq - AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -660,6 +563,8 @@ CREATE TABLE zulip.otp_static_staticdevice ( user_id integer NOT NULL, throttling_failure_count integer NOT NULL, throttling_failure_timestamp timestamp with time zone, + created_at timestamp with time zone, + last_used_at timestamp with time zone, CONSTRAINT otp_static_staticdevice_throttling_failure_count_check CHECK ((throttling_failure_count >= 0)) ); @@ -670,22 +575,14 @@ ALTER TABLE zulip.otp_static_staticdevice OWNER TO zulip; -- Name: otp_static_staticdevice_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.otp_static_staticdevice_id_seq - AS integer +ALTER TABLE zulip.otp_static_staticdevice ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.otp_static_staticdevice_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.otp_static_staticdevice_id_seq OWNER TO zulip; - --- --- Name: otp_static_staticdevice_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.otp_static_staticdevice_id_seq OWNED BY zulip.otp_static_staticdevice.id; + CACHE 1 +); -- @@ -705,22 +602,14 @@ ALTER TABLE zulip.otp_static_statictoken OWNER TO zulip; -- Name: otp_static_statictoken_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.otp_static_statictoken_id_seq - AS integer +ALTER TABLE zulip.otp_static_statictoken ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.otp_static_statictoken_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.otp_static_statictoken_id_seq OWNER TO zulip; - --- --- Name: otp_static_statictoken_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.otp_static_statictoken_id_seq OWNED BY zulip.otp_static_statictoken.id; + CACHE 1 +); -- @@ -741,6 +630,8 @@ CREATE TABLE zulip.otp_totp_totpdevice ( user_id integer NOT NULL, throttling_failure_count integer NOT NULL, throttling_failure_timestamp timestamp with time zone, + created_at timestamp with time zone, + last_used_at timestamp with time zone, CONSTRAINT otp_totp_totpdevice_digits_check CHECK ((digits >= 0)), CONSTRAINT otp_totp_totpdevice_step_check CHECK ((step >= 0)), CONSTRAINT otp_totp_totpdevice_throttling_failure_count_check CHECK ((throttling_failure_count >= 0)), @@ -754,22 +645,14 @@ ALTER TABLE zulip.otp_totp_totpdevice OWNER TO zulip; -- Name: otp_totp_totpdevice_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.otp_totp_totpdevice_id_seq - AS integer +ALTER TABLE zulip.otp_totp_totpdevice ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.otp_totp_totpdevice_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.otp_totp_totpdevice_id_seq OWNER TO zulip; - --- --- Name: otp_totp_totpdevice_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.otp_totp_totpdevice_id_seq OWNED BY zulip.otp_totp_totpdevice.id; + CACHE 1 +); -- @@ -793,21 +676,14 @@ ALTER TABLE zulip.social_auth_association OWNER TO zulip; -- Name: social_auth_association_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.social_auth_association_id_seq +ALTER TABLE zulip.social_auth_association ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.social_auth_association_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.social_auth_association_id_seq OWNER TO zulip; - --- --- Name: social_auth_association_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.social_auth_association_id_seq OWNED BY zulip.social_auth_association.id; + CACHE 1 +); -- @@ -829,21 +705,14 @@ ALTER TABLE zulip.social_auth_code OWNER TO zulip; -- Name: social_auth_code_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.social_auth_code_id_seq +ALTER TABLE zulip.social_auth_code ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.social_auth_code_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.social_auth_code_id_seq OWNER TO zulip; - --- --- Name: social_auth_code_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.social_auth_code_id_seq OWNED BY zulip.social_auth_code.id; + CACHE 1 +); -- @@ -864,21 +733,14 @@ ALTER TABLE zulip.social_auth_nonce OWNER TO zulip; -- Name: social_auth_nonce_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.social_auth_nonce_id_seq +ALTER TABLE zulip.social_auth_nonce ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.social_auth_nonce_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.social_auth_nonce_id_seq OWNER TO zulip; - --- --- Name: social_auth_nonce_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.social_auth_nonce_id_seq OWNED BY zulip.social_auth_nonce.id; + CACHE 1 +); -- @@ -902,21 +764,14 @@ ALTER TABLE zulip.social_auth_partial OWNER TO zulip; -- Name: social_auth_partial_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.social_auth_partial_id_seq +ALTER TABLE zulip.social_auth_partial ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.social_auth_partial_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.social_auth_partial_id_seq OWNER TO zulip; - --- --- Name: social_auth_partial_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.social_auth_partial_id_seq OWNED BY zulip.social_auth_partial.id; + CACHE 1 +); -- @@ -940,21 +795,14 @@ ALTER TABLE zulip.social_auth_usersocialauth OWNER TO zulip; -- Name: social_auth_usersocialauth_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.social_auth_usersocialauth_id_seq +ALTER TABLE zulip.social_auth_usersocialauth ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.social_auth_usersocialauth_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.social_auth_usersocialauth_id_seq OWNER TO zulip; - --- --- Name: social_auth_usersocialauth_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.social_auth_usersocialauth_id_seq OWNED BY zulip.social_auth_usersocialauth.id; + CACHE 1 +); -- @@ -978,12 +826,12 @@ CREATE TABLE zulip.two_factor_phonedevice ( id integer NOT NULL, name character varying(64) NOT NULL, confirmed boolean NOT NULL, + throttling_failure_timestamp timestamp with time zone, + throttling_failure_count integer NOT NULL, number character varying(128) NOT NULL, key character varying(40) NOT NULL, method character varying(4) NOT NULL, user_id integer NOT NULL, - throttling_failure_count integer NOT NULL, - throttling_failure_timestamp timestamp with time zone, CONSTRAINT two_factor_phonedevice_throttling_failure_count_check CHECK ((throttling_failure_count >= 0)) ); @@ -994,22 +842,14 @@ ALTER TABLE zulip.two_factor_phonedevice OWNER TO zulip; -- Name: two_factor_phonedevice_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.two_factor_phonedevice_id_seq - AS integer +ALTER TABLE zulip.two_factor_phonedevice ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.two_factor_phonedevice_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.two_factor_phonedevice_id_seq OWNER TO zulip; - --- --- Name: two_factor_phonedevice_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.two_factor_phonedevice_id_seq OWNED BY zulip.two_factor_phonedevice.id; + CACHE 1 +); -- @@ -1017,7 +857,7 @@ ALTER SEQUENCE zulip.two_factor_phonedevice_id_seq OWNED BY zulip.two_factor_pho -- CREATE TABLE zulip.zerver_alertword ( - id integer NOT NULL, + id bigint NOT NULL, word text NOT NULL, realm_id integer NOT NULL, user_profile_id integer NOT NULL @@ -1030,22 +870,14 @@ ALTER TABLE zulip.zerver_alertword OWNER TO zulip; -- Name: zerver_alertword_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_alertword_id_seq - AS integer +ALTER TABLE zulip.zerver_alertword ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_alertword_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_alertword_id_seq OWNER TO zulip; - --- --- Name: zerver_alertword_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_alertword_id_seq OWNED BY zulip.zerver_alertword.id; + CACHE 1 +); -- @@ -1053,7 +885,7 @@ ALTER SEQUENCE zulip.zerver_alertword_id_seq OWNED BY zulip.zerver_alertword.id; -- CREATE TABLE zulip.zerver_archivedattachment ( - id integer NOT NULL, + id bigint NOT NULL, file_name text NOT NULL, path_id text NOT NULL, is_realm_public boolean, @@ -1061,7 +893,8 @@ CREATE TABLE zulip.zerver_archivedattachment ( size integer NOT NULL, owner_id integer NOT NULL, realm_id integer NOT NULL, - is_web_public boolean + is_web_public boolean, + content_type text ); @@ -1071,22 +904,14 @@ ALTER TABLE zulip.zerver_archivedattachment OWNER TO zulip; -- Name: zerver_archivedattachment_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_archivedattachment_id_seq - AS integer +ALTER TABLE zulip.zerver_archivedattachment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_archivedattachment_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_archivedattachment_id_seq OWNER TO zulip; - --- --- Name: zerver_archivedattachment_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_archivedattachment_id_seq OWNED BY zulip.zerver_archivedattachment.id; + CACHE 1 +); -- @@ -1094,8 +919,8 @@ ALTER SEQUENCE zulip.zerver_archivedattachment_id_seq OWNED BY zulip.zerver_arch -- CREATE TABLE zulip.zerver_archivedattachment_messages ( - id integer NOT NULL, - archivedattachment_id integer NOT NULL, + id bigint NOT NULL, + archivedattachment_id bigint NOT NULL, archivedmessage_id integer NOT NULL ); @@ -1106,22 +931,14 @@ ALTER TABLE zulip.zerver_archivedattachment_messages OWNER TO zulip; -- Name: zerver_archivedattachment_messages_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_archivedattachment_messages_id_seq - AS integer +ALTER TABLE zulip.zerver_archivedattachment_messages ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_archivedattachment_messages_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_archivedattachment_messages_id_seq OWNER TO zulip; - --- --- Name: zerver_archivedattachment_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_archivedattachment_messages_id_seq OWNED BY zulip.zerver_archivedattachment_messages.id; + CACHE 1 +); -- @@ -1143,8 +960,10 @@ CREATE TABLE zulip.zerver_archivedmessage ( recipient_id integer NOT NULL, sender_id integer NOT NULL, sending_client_id integer NOT NULL, - archive_transaction_id integer NOT NULL, - realm_id integer NOT NULL + archive_transaction_id bigint NOT NULL, + realm_id integer NOT NULL, + type smallint DEFAULT 1 NOT NULL, + CONSTRAINT zerver_archivedmessage_type_check CHECK ((type >= 0)) ); @@ -1154,30 +973,22 @@ ALTER TABLE zulip.zerver_archivedmessage OWNER TO zulip; -- Name: zerver_archivedmessage_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_archivedmessage_id_seq - AS integer +ALTER TABLE zulip.zerver_archivedmessage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_archivedmessage_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - + CACHE 1 +); -ALTER TABLE zulip.zerver_archivedmessage_id_seq OWNER TO zulip; -- --- Name: zerver_archivedmessage_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_archivedmessage_id_seq OWNED BY zulip.zerver_archivedmessage.id; - - --- --- Name: zerver_archivedreaction; Type: TABLE; Schema: zulip; Owner: zulip +-- Name: zerver_archivedreaction; Type: TABLE; Schema: zulip; Owner: zulip -- CREATE TABLE zulip.zerver_archivedreaction ( - id integer NOT NULL, + id bigint NOT NULL, emoji_name text NOT NULL, reaction_type character varying(30) NOT NULL, emoji_code text NOT NULL, @@ -1192,22 +1003,14 @@ ALTER TABLE zulip.zerver_archivedreaction OWNER TO zulip; -- Name: zerver_archivedreaction_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_archivedreaction_id_seq - AS integer +ALTER TABLE zulip.zerver_archivedreaction ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_archivedreaction_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_archivedreaction_id_seq OWNER TO zulip; - --- --- Name: zerver_archivedreaction_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_archivedreaction_id_seq OWNED BY zulip.zerver_archivedreaction.id; + CACHE 1 +); -- @@ -1215,7 +1018,7 @@ ALTER SEQUENCE zulip.zerver_archivedreaction_id_seq OWNED BY zulip.zerver_archiv -- CREATE TABLE zulip.zerver_archivedsubmessage ( - id integer NOT NULL, + id bigint NOT NULL, msg_type text NOT NULL, content text NOT NULL, message_id integer NOT NULL, @@ -1229,22 +1032,14 @@ ALTER TABLE zulip.zerver_archivedsubmessage OWNER TO zulip; -- Name: zerver_archivedsubmessage_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_archivedsubmessage_id_seq - AS integer +ALTER TABLE zulip.zerver_archivedsubmessage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_archivedsubmessage_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_archivedsubmessage_id_seq OWNER TO zulip; - --- --- Name: zerver_archivedsubmessage_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_archivedsubmessage_id_seq OWNED BY zulip.zerver_archivedsubmessage.id; + CACHE 1 +); -- @@ -1265,21 +1060,14 @@ ALTER TABLE zulip.zerver_archivedusermessage OWNER TO zulip; -- Name: zerver_archivedusermessage_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_archivedusermessage_id_seq +ALTER TABLE zulip.zerver_archivedusermessage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_archivedusermessage_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_archivedusermessage_id_seq OWNER TO zulip; - --- --- Name: zerver_archivedusermessage_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_archivedusermessage_id_seq OWNED BY zulip.zerver_archivedusermessage.id; + CACHE 1 +); -- @@ -1287,11 +1075,12 @@ ALTER SEQUENCE zulip.zerver_archivedusermessage_id_seq OWNED BY zulip.zerver_arc -- CREATE TABLE zulip.zerver_archivetransaction ( - id integer NOT NULL, + id bigint NOT NULL, "timestamp" timestamp with time zone NOT NULL, restored boolean NOT NULL, type smallint NOT NULL, realm_id integer, + restored_timestamp timestamp with time zone, CONSTRAINT zerver_archivetransaction_type_check CHECK ((type >= 0)) ); @@ -1302,22 +1091,14 @@ ALTER TABLE zulip.zerver_archivetransaction OWNER TO zulip; -- Name: zerver_archivetransaction_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_archivetransaction_id_seq - AS integer +ALTER TABLE zulip.zerver_archivetransaction ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_archivetransaction_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_archivetransaction_id_seq OWNER TO zulip; - --- --- Name: zerver_archivetransaction_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_archivetransaction_id_seq OWNED BY zulip.zerver_archivetransaction.id; + CACHE 1 +); -- @@ -1325,7 +1106,7 @@ ALTER SEQUENCE zulip.zerver_archivetransaction_id_seq OWNED BY zulip.zerver_arch -- CREATE TABLE zulip.zerver_attachment ( - id integer NOT NULL, + id bigint NOT NULL, file_name text NOT NULL, path_id text NOT NULL, create_time timestamp with time zone NOT NULL, @@ -1333,7 +1114,8 @@ CREATE TABLE zulip.zerver_attachment ( is_realm_public boolean, realm_id integer NOT NULL, size integer NOT NULL, - is_web_public boolean + is_web_public boolean, + content_type text ); @@ -1343,22 +1125,14 @@ ALTER TABLE zulip.zerver_attachment OWNER TO zulip; -- Name: zerver_attachment_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_attachment_id_seq - AS integer +ALTER TABLE zulip.zerver_attachment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_attachment_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_attachment_id_seq OWNER TO zulip; - --- --- Name: zerver_attachment_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_attachment_id_seq OWNED BY zulip.zerver_attachment.id; + CACHE 1 +); -- @@ -1366,8 +1140,8 @@ ALTER SEQUENCE zulip.zerver_attachment_id_seq OWNED BY zulip.zerver_attachment.i -- CREATE TABLE zulip.zerver_attachment_messages ( - id integer NOT NULL, - attachment_id integer NOT NULL, + id bigint NOT NULL, + attachment_id bigint NOT NULL, message_id integer NOT NULL ); @@ -1378,22 +1152,14 @@ ALTER TABLE zulip.zerver_attachment_messages OWNER TO zulip; -- Name: zerver_attachment_messages_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_attachment_messages_id_seq - AS integer +ALTER TABLE zulip.zerver_attachment_messages ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_attachment_messages_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_attachment_messages_id_seq OWNER TO zulip; - --- --- Name: zerver_attachment_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_attachment_messages_id_seq OWNED BY zulip.zerver_attachment_messages.id; + CACHE 1 +); -- @@ -1401,9 +1167,9 @@ ALTER SEQUENCE zulip.zerver_attachment_messages_id_seq OWNED BY zulip.zerver_att -- CREATE TABLE zulip.zerver_attachment_scheduled_messages ( - id integer NOT NULL, - attachment_id integer NOT NULL, - scheduledmessage_id integer NOT NULL + id bigint NOT NULL, + attachment_id bigint NOT NULL, + scheduledmessage_id bigint NOT NULL ); @@ -1428,7 +1194,7 @@ ALTER TABLE zulip.zerver_attachment_scheduled_messages ALTER COLUMN id ADD GENER -- CREATE TABLE zulip.zerver_botconfigdata ( - id integer NOT NULL, + id bigint NOT NULL, key text NOT NULL, value text NOT NULL, bot_profile_id integer NOT NULL @@ -1442,7 +1208,7 @@ ALTER TABLE zulip.zerver_botconfigdata OWNER TO zulip; -- CREATE TABLE zulip.zerver_botstoragedata ( - id integer NOT NULL, + id bigint NOT NULL, key text NOT NULL, value text NOT NULL, bot_profile_id integer NOT NULL @@ -1455,44 +1221,28 @@ ALTER TABLE zulip.zerver_botstoragedata OWNER TO zulip; -- Name: zerver_botuserconfigdata_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_botuserconfigdata_id_seq - AS integer +ALTER TABLE zulip.zerver_botconfigdata ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_botuserconfigdata_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_botuserconfigdata_id_seq OWNER TO zulip; - --- --- Name: zerver_botuserconfigdata_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_botuserconfigdata_id_seq OWNED BY zulip.zerver_botconfigdata.id; + CACHE 1 +); -- -- Name: zerver_botuserstatedata_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_botuserstatedata_id_seq - AS integer +ALTER TABLE zulip.zerver_botstoragedata ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_botuserstatedata_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_botuserstatedata_id_seq OWNER TO zulip; - --- --- Name: zerver_botuserstatedata_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_botuserstatedata_id_seq OWNED BY zulip.zerver_botstoragedata.id; + CACHE 1 +); -- @@ -1511,22 +1261,14 @@ ALTER TABLE zulip.zerver_client OWNER TO zulip; -- Name: zerver_client_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_client_id_seq - AS integer +ALTER TABLE zulip.zerver_client ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_client_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_client_id_seq OWNER TO zulip; - --- --- Name: zerver_client_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_client_id_seq OWNED BY zulip.zerver_client.id; + CACHE 1 +); -- @@ -1534,7 +1276,7 @@ ALTER SEQUENCE zulip.zerver_client_id_seq OWNED BY zulip.zerver_client.id; -- CREATE TABLE zulip.zerver_customprofilefield ( - id integer NOT NULL, + id bigint NOT NULL, name character varying(40) NOT NULL, field_type smallint NOT NULL, realm_id integer NOT NULL, @@ -1542,6 +1284,7 @@ CREATE TABLE zulip.zerver_customprofilefield ( field_data text NOT NULL, "order" integer NOT NULL, display_in_profile_summary boolean NOT NULL, + required boolean NOT NULL, CONSTRAINT zerver_customprofilefield_field_type_check CHECK ((field_type >= 0)) ); @@ -1552,22 +1295,14 @@ ALTER TABLE zulip.zerver_customprofilefield OWNER TO zulip; -- Name: zerver_customprofilefield_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_customprofilefield_id_seq - AS integer +ALTER TABLE zulip.zerver_customprofilefield ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_customprofilefield_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_customprofilefield_id_seq OWNER TO zulip; - --- --- Name: zerver_customprofilefield_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_customprofilefield_id_seq OWNED BY zulip.zerver_customprofilefield.id; + CACHE 1 +); -- @@ -1575,9 +1310,9 @@ ALTER SEQUENCE zulip.zerver_customprofilefield_id_seq OWNED BY zulip.zerver_cust -- CREATE TABLE zulip.zerver_customprofilefieldvalue ( - id integer NOT NULL, + id bigint NOT NULL, value text NOT NULL, - field_id integer NOT NULL, + field_id bigint NOT NULL, user_profile_id integer NOT NULL, rendered_value text ); @@ -1589,22 +1324,14 @@ ALTER TABLE zulip.zerver_customprofilefieldvalue OWNER TO zulip; -- Name: zerver_customprofilefieldvalue_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_customprofilefieldvalue_id_seq - AS integer +ALTER TABLE zulip.zerver_customprofilefieldvalue ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_customprofilefieldvalue_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_customprofilefieldvalue_id_seq OWNER TO zulip; - --- --- Name: zerver_customprofilefieldvalue_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_customprofilefieldvalue_id_seq OWNED BY zulip.zerver_customprofilefieldvalue.id; + CACHE 1 +); -- @@ -1612,9 +1339,9 @@ ALTER SEQUENCE zulip.zerver_customprofilefieldvalue_id_seq OWNED BY zulip.zerver -- CREATE TABLE zulip.zerver_defaultstream ( - id integer NOT NULL, + id bigint NOT NULL, realm_id integer NOT NULL, - stream_id integer NOT NULL + stream_id bigint NOT NULL ); @@ -1624,22 +1351,14 @@ ALTER TABLE zulip.zerver_defaultstream OWNER TO zulip; -- Name: zerver_defaultstream_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_defaultstream_id_seq - AS integer +ALTER TABLE zulip.zerver_defaultstream ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_defaultstream_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_defaultstream_id_seq OWNER TO zulip; - --- --- Name: zerver_defaultstream_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_defaultstream_id_seq OWNED BY zulip.zerver_defaultstream.id; + CACHE 1 +); -- @@ -1647,7 +1366,7 @@ ALTER SEQUENCE zulip.zerver_defaultstream_id_seq OWNED BY zulip.zerver_defaultst -- CREATE TABLE zulip.zerver_defaultstreamgroup ( - id integer NOT NULL, + id bigint NOT NULL, name character varying(60) NOT NULL, realm_id integer NOT NULL, description character varying(1024) NOT NULL @@ -1660,22 +1379,14 @@ ALTER TABLE zulip.zerver_defaultstreamgroup OWNER TO zulip; -- Name: zerver_defaultstreamgroup_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_defaultstreamgroup_id_seq - AS integer +ALTER TABLE zulip.zerver_defaultstreamgroup ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_defaultstreamgroup_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_defaultstreamgroup_id_seq OWNER TO zulip; - --- --- Name: zerver_defaultstreamgroup_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_defaultstreamgroup_id_seq OWNED BY zulip.zerver_defaultstreamgroup.id; + CACHE 1 +); -- @@ -1683,9 +1394,9 @@ ALTER SEQUENCE zulip.zerver_defaultstreamgroup_id_seq OWNED BY zulip.zerver_defa -- CREATE TABLE zulip.zerver_defaultstreamgroup_streams ( - id integer NOT NULL, - defaultstreamgroup_id integer NOT NULL, - stream_id integer NOT NULL + id bigint NOT NULL, + defaultstreamgroup_id bigint NOT NULL, + stream_id bigint NOT NULL ); @@ -1695,22 +1406,14 @@ ALTER TABLE zulip.zerver_defaultstreamgroup_streams OWNER TO zulip; -- Name: zerver_defaultstreamgroup_streams_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_defaultstreamgroup_streams_id_seq - AS integer +ALTER TABLE zulip.zerver_defaultstreamgroup_streams ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_defaultstreamgroup_streams_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_defaultstreamgroup_streams_id_seq OWNER TO zulip; - --- --- Name: zerver_defaultstreamgroup_streams_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_defaultstreamgroup_streams_id_seq OWNED BY zulip.zerver_defaultstreamgroup_streams.id; + CACHE 1 +); -- @@ -1718,7 +1421,7 @@ ALTER SEQUENCE zulip.zerver_defaultstreamgroup_streams_id_seq OWNED BY zulip.zer -- CREATE TABLE zulip.zerver_draft ( - id integer NOT NULL, + id bigint NOT NULL, topic character varying(60) NOT NULL, content text NOT NULL, last_edit_time timestamp with time zone NOT NULL, @@ -1733,22 +1436,14 @@ ALTER TABLE zulip.zerver_draft OWNER TO zulip; -- Name: zerver_draft_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_draft_id_seq - AS integer +ALTER TABLE zulip.zerver_draft ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_draft_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_draft_id_seq OWNER TO zulip; - --- --- Name: zerver_draft_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_draft_id_seq OWNED BY zulip.zerver_draft.id; + CACHE 1 +); -- @@ -1756,7 +1451,7 @@ ALTER SEQUENCE zulip.zerver_draft_id_seq OWNED BY zulip.zerver_draft.id; -- CREATE TABLE zulip.zerver_emailchangestatus ( - id integer NOT NULL, + id bigint NOT NULL, new_email character varying(254) NOT NULL, old_email character varying(254) NOT NULL, updated_at timestamp with time zone NOT NULL, @@ -1772,22 +1467,14 @@ ALTER TABLE zulip.zerver_emailchangestatus OWNER TO zulip; -- Name: zerver_emailchangestatus_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_emailchangestatus_id_seq - AS integer +ALTER TABLE zulip.zerver_emailchangestatus ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_emailchangestatus_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_emailchangestatus_id_seq OWNER TO zulip; - --- --- Name: zerver_emailchangestatus_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_emailchangestatus_id_seq OWNED BY zulip.zerver_emailchangestatus.id; + CACHE 1 +); -- @@ -1795,9 +1482,9 @@ ALTER SEQUENCE zulip.zerver_emailchangestatus_id_seq OWNED BY zulip.zerver_email -- CREATE TABLE zulip.zerver_groupgroupmembership ( - id integer NOT NULL, - subgroup_id integer NOT NULL, - supergroup_id integer NOT NULL + id bigint NOT NULL, + subgroup_id bigint NOT NULL, + supergroup_id bigint NOT NULL ); @@ -1807,22 +1494,14 @@ ALTER TABLE zulip.zerver_groupgroupmembership OWNER TO zulip; -- Name: zerver_groupgroupmembership_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_groupgroupmembership_id_seq - AS integer +ALTER TABLE zulip.zerver_groupgroupmembership ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_groupgroupmembership_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_groupgroupmembership_id_seq OWNER TO zulip; - --- --- Name: zerver_groupgroupmembership_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_groupgroupmembership_id_seq OWNED BY zulip.zerver_groupgroupmembership.id; + CACHE 1 +); -- @@ -1830,7 +1509,7 @@ ALTER SEQUENCE zulip.zerver_groupgroupmembership_id_seq OWNED BY zulip.zerver_gr -- CREATE TABLE zulip.zerver_huddle ( - id integer NOT NULL, + id bigint NOT NULL, huddle_hash character varying(40) NOT NULL, recipient_id integer ); @@ -1842,22 +1521,45 @@ ALTER TABLE zulip.zerver_huddle OWNER TO zulip; -- Name: zerver_huddle_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_huddle_id_seq - AS integer +ALTER TABLE zulip.zerver_huddle ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_huddle_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; + CACHE 1 +); + + +-- +-- Name: zerver_imageattachment; Type: TABLE; Schema: zulip; Owner: zulip +-- + +CREATE TABLE zulip.zerver_imageattachment ( + id bigint NOT NULL, + path_id text NOT NULL, + original_width_px integer NOT NULL, + original_height_px integer NOT NULL, + frames integer NOT NULL, + thumbnail_metadata jsonb NOT NULL, + realm_id integer NOT NULL +); -ALTER TABLE zulip.zerver_huddle_id_seq OWNER TO zulip; +ALTER TABLE zulip.zerver_imageattachment OWNER TO zulip; -- --- Name: zerver_huddle_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip +-- Name: zerver_imageattachment_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -ALTER SEQUENCE zulip.zerver_huddle_id_seq OWNED BY zulip.zerver_huddle.id; +ALTER TABLE zulip.zerver_imageattachment ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_imageattachment_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); -- @@ -1880,7 +1582,9 @@ CREATE TABLE zulip.zerver_message ( sending_client_id integer NOT NULL, search_tsvector tsvector, date_sent timestamp with time zone NOT NULL, - realm_id integer NOT NULL + realm_id integer NOT NULL, + type smallint DEFAULT 1 NOT NULL, + CONSTRAINT zerver_message_type_check CHECK ((type >= 0)) ); ALTER TABLE ONLY zulip.zerver_message ALTER COLUMN search_tsvector SET STATISTICS 10000; @@ -1891,22 +1595,14 @@ ALTER TABLE zulip.zerver_message OWNER TO zulip; -- Name: zerver_message_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_message_id_seq - AS integer +ALTER TABLE zulip.zerver_message ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_message_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_message_id_seq OWNER TO zulip; - --- --- Name: zerver_message_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_message_id_seq OWNED BY zulip.zerver_message.id; + CACHE 1 +); -- @@ -1914,7 +1610,7 @@ ALTER SEQUENCE zulip.zerver_message_id_seq OWNED BY zulip.zerver_message.id; -- CREATE TABLE zulip.zerver_missedmessageemailaddress ( - id integer NOT NULL, + id bigint NOT NULL, email_token character varying(34) NOT NULL, "timestamp" timestamp with time zone NOT NULL, times_used integer NOT NULL, @@ -1930,22 +1626,14 @@ ALTER TABLE zulip.zerver_missedmessageemailaddress OWNER TO zulip; -- Name: zerver_missedmessageemailaddress_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_missedmessageemailaddress_id_seq - AS integer +ALTER TABLE zulip.zerver_missedmessageemailaddress ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_missedmessageemailaddress_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_missedmessageemailaddress_id_seq OWNER TO zulip; - --- --- Name: zerver_missedmessageemailaddress_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_missedmessageemailaddress_id_seq OWNED BY zulip.zerver_missedmessageemailaddress.id; + CACHE 1 +); -- @@ -1953,11 +1641,12 @@ ALTER SEQUENCE zulip.zerver_missedmessageemailaddress_id_seq OWNED BY zulip.zerv -- CREATE TABLE zulip.zerver_multiuseinvite ( - id integer NOT NULL, + id bigint NOT NULL, realm_id integer NOT NULL, referred_by_id integer NOT NULL, invited_as smallint NOT NULL, status integer NOT NULL, + include_realm_default_subscriptions boolean NOT NULL, CONSTRAINT zerver_multiuseinvite_invited_as_check CHECK ((invited_as >= 0)) ); @@ -1968,22 +1657,14 @@ ALTER TABLE zulip.zerver_multiuseinvite OWNER TO zulip; -- Name: zerver_multiuseinvite_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_multiuseinvite_id_seq - AS integer +ALTER TABLE zulip.zerver_multiuseinvite ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_multiuseinvite_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_multiuseinvite_id_seq OWNER TO zulip; - --- --- Name: zerver_multiuseinvite_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_multiuseinvite_id_seq OWNED BY zulip.zerver_multiuseinvite.id; + CACHE 1 +); -- @@ -1991,9 +1672,9 @@ ALTER SEQUENCE zulip.zerver_multiuseinvite_id_seq OWNED BY zulip.zerver_multiuse -- CREATE TABLE zulip.zerver_multiuseinvite_streams ( - id integer NOT NULL, - multiuseinvite_id integer NOT NULL, - stream_id integer NOT NULL + id bigint NOT NULL, + multiuseinvite_id bigint NOT NULL, + stream_id bigint NOT NULL ); @@ -2003,22 +1684,14 @@ ALTER TABLE zulip.zerver_multiuseinvite_streams OWNER TO zulip; -- Name: zerver_multiuseinvite_streams_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_multiuseinvite_streams_id_seq - AS integer +ALTER TABLE zulip.zerver_multiuseinvite_streams ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_multiuseinvite_streams_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_multiuseinvite_streams_id_seq OWNER TO zulip; - --- --- Name: zerver_multiuseinvite_streams_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_multiuseinvite_streams_id_seq OWNED BY zulip.zerver_multiuseinvite_streams.id; + CACHE 1 +); -- @@ -2026,10 +1699,10 @@ ALTER SEQUENCE zulip.zerver_multiuseinvite_streams_id_seq OWNED BY zulip.zerver_ -- CREATE TABLE zulip.zerver_usertopic ( - id integer NOT NULL, + id bigint NOT NULL, topic_name character varying(60) NOT NULL, recipient_id integer NOT NULL, - stream_id integer NOT NULL, + stream_id bigint NOT NULL, user_profile_id integer NOT NULL, last_updated timestamp with time zone NOT NULL, visibility_policy smallint NOT NULL @@ -2042,22 +1715,14 @@ ALTER TABLE zulip.zerver_usertopic OWNER TO zulip; -- Name: zerver_mutedtopic_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_mutedtopic_id_seq - AS integer +ALTER TABLE zulip.zerver_usertopic ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_mutedtopic_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_mutedtopic_id_seq OWNER TO zulip; - --- --- Name: zerver_mutedtopic_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_mutedtopic_id_seq OWNED BY zulip.zerver_usertopic.id; + CACHE 1 +); -- @@ -2065,7 +1730,7 @@ ALTER SEQUENCE zulip.zerver_mutedtopic_id_seq OWNED BY zulip.zerver_usertopic.id -- CREATE TABLE zulip.zerver_muteduser ( - id integer NOT NULL, + id bigint NOT NULL, date_muted timestamp with time zone NOT NULL, muted_user_id integer NOT NULL, user_profile_id integer NOT NULL @@ -2078,31 +1743,39 @@ ALTER TABLE zulip.zerver_muteduser OWNER TO zulip; -- Name: zerver_muteduser_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_muteduser_id_seq - AS integer +ALTER TABLE zulip.zerver_muteduser ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_muteduser_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - + CACHE 1 +); -ALTER TABLE zulip.zerver_muteduser_id_seq OWNER TO zulip; -- --- Name: zerver_muteduser_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip +-- Name: zerver_namedusergroup; Type: TABLE; Schema: zulip; Owner: zulip -- -ALTER SEQUENCE zulip.zerver_muteduser_id_seq OWNED BY zulip.zerver_muteduser.id; +CREATE TABLE zulip.zerver_namedusergroup ( + usergroup_ptr_id bigint NOT NULL, + name character varying(100) NOT NULL, + description text NOT NULL, + is_system_group boolean NOT NULL, + can_mention_group_id bigint NOT NULL, + realm_id integer NOT NULL +); + +ALTER TABLE zulip.zerver_namedusergroup OWNER TO zulip; -- -- Name: zerver_onboardingstep; Type: TABLE; Schema: zulip; Owner: zulip -- CREATE TABLE zulip.zerver_onboardingstep ( - id integer NOT NULL, - onboarding_step character varying(30) NOT NULL, + id bigint NOT NULL, + onboarding_step character varying(40) NOT NULL, "timestamp" timestamp with time zone NOT NULL, user_id integer NOT NULL ); @@ -2114,22 +1787,42 @@ ALTER TABLE zulip.zerver_onboardingstep OWNER TO zulip; -- Name: zerver_onboardingstep_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_onboardingstep_id_seq - AS integer +ALTER TABLE zulip.zerver_onboardingstep ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_onboardingstep_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; + CACHE 1 +); + + +-- +-- Name: zerver_onboardingusermessage; Type: TABLE; Schema: zulip; Owner: zulip +-- + +CREATE TABLE zulip.zerver_onboardingusermessage ( + id bigint NOT NULL, + flags bigint NOT NULL, + message_id integer NOT NULL, + realm_id integer NOT NULL +); -ALTER TABLE zulip.zerver_onboardingstep_id_seq OWNER TO zulip; +ALTER TABLE zulip.zerver_onboardingusermessage OWNER TO zulip; -- --- Name: zerver_onboardingstep_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip +-- Name: zerver_onboardingusermessage_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -ALTER SEQUENCE zulip.zerver_onboardingstep_id_seq OWNED BY zulip.zerver_onboardingstep.id; +ALTER TABLE zulip.zerver_onboardingusermessage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_onboardingusermessage_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); -- @@ -2137,7 +1830,7 @@ ALTER SEQUENCE zulip.zerver_onboardingstep_id_seq OWNED BY zulip.zerver_onboardi -- CREATE TABLE zulip.zerver_preregistrationrealm ( - id integer NOT NULL, + id bigint NOT NULL, name character varying(40) NOT NULL, org_type smallint NOT NULL, string_id character varying(40) NOT NULL, @@ -2171,7 +1864,7 @@ ALTER TABLE zulip.zerver_preregistrationrealm ALTER COLUMN id ADD GENERATED BY D -- CREATE TABLE zulip.zerver_preregistrationuser ( - id integer NOT NULL, + id bigint NOT NULL, email character varying(254) NOT NULL, invited_at timestamp with time zone NOT NULL, status integer NOT NULL, @@ -2183,7 +1876,9 @@ CREATE TABLE zulip.zerver_preregistrationuser ( full_name character varying(100), full_name_validated boolean NOT NULL, created_user_id integer, - multiuse_invite_id integer, + multiuse_invite_id bigint, + include_realm_default_subscriptions boolean NOT NULL, + notify_referrer_on_join boolean NOT NULL, CONSTRAINT zerver_preregistrationuser_invited_as_check CHECK ((invited_as >= 0)) ); @@ -2194,22 +1889,14 @@ ALTER TABLE zulip.zerver_preregistrationuser OWNER TO zulip; -- Name: zerver_preregistrationuser_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_preregistrationuser_id_seq - AS integer +ALTER TABLE zulip.zerver_preregistrationuser ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_preregistrationuser_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_preregistrationuser_id_seq OWNER TO zulip; - --- --- Name: zerver_preregistrationuser_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_preregistrationuser_id_seq OWNED BY zulip.zerver_preregistrationuser.id; + CACHE 1 +); -- @@ -2217,9 +1904,9 @@ ALTER SEQUENCE zulip.zerver_preregistrationuser_id_seq OWNED BY zulip.zerver_pre -- CREATE TABLE zulip.zerver_preregistrationuser_streams ( - id integer NOT NULL, - preregistrationuser_id integer NOT NULL, - stream_id integer NOT NULL + id bigint NOT NULL, + preregistrationuser_id bigint NOT NULL, + stream_id bigint NOT NULL ); @@ -2229,22 +1916,42 @@ ALTER TABLE zulip.zerver_preregistrationuser_streams OWNER TO zulip; -- Name: zerver_preregistrationuser_streams_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_preregistrationuser_streams_id_seq - AS integer +ALTER TABLE zulip.zerver_preregistrationuser_streams ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_preregistrationuser_streams_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; + CACHE 1 +); + + +-- +-- Name: zerver_presencesequence; Type: TABLE; Schema: zulip; Owner: zulip +-- + +CREATE TABLE zulip.zerver_presencesequence ( + id bigint NOT NULL, + last_update_id bigint NOT NULL, + realm_id integer NOT NULL, + CONSTRAINT zerver_presencesequence_last_update_id_check CHECK ((last_update_id >= 0)) +); -ALTER TABLE zulip.zerver_preregistrationuser_streams_id_seq OWNER TO zulip; +ALTER TABLE zulip.zerver_presencesequence OWNER TO zulip; -- --- Name: zerver_preregistrationuser_streams_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip +-- Name: zerver_presencesequence_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -ALTER SEQUENCE zulip.zerver_preregistrationuser_streams_id_seq OWNED BY zulip.zerver_preregistrationuser_streams.id; +ALTER TABLE zulip.zerver_presencesequence ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_presencesequence_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); -- @@ -2252,7 +1959,7 @@ ALTER SEQUENCE zulip.zerver_preregistrationuser_streams_id_seq OWNED BY zulip.ze -- CREATE TABLE zulip.zerver_pushdevicetoken ( - id integer NOT NULL, + id bigint NOT NULL, kind smallint NOT NULL, token character varying(4096) NOT NULL, last_updated timestamp with time zone NOT NULL, @@ -2268,22 +1975,14 @@ ALTER TABLE zulip.zerver_pushdevicetoken OWNER TO zulip; -- Name: zerver_pushdevicetoken_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_pushdevicetoken_id_seq - AS integer +ALTER TABLE zulip.zerver_pushdevicetoken ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_pushdevicetoken_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_pushdevicetoken_id_seq OWNER TO zulip; - --- --- Name: zerver_pushdevicetoken_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_pushdevicetoken_id_seq OWNED BY zulip.zerver_pushdevicetoken.id; + CACHE 1 +); -- @@ -2291,7 +1990,7 @@ ALTER SEQUENCE zulip.zerver_pushdevicetoken_id_seq OWNED BY zulip.zerver_pushdev -- CREATE TABLE zulip.zerver_reaction ( - id integer NOT NULL, + id bigint NOT NULL, user_profile_id integer NOT NULL, message_id integer NOT NULL, emoji_name text NOT NULL, @@ -2306,22 +2005,14 @@ ALTER TABLE zulip.zerver_reaction OWNER TO zulip; -- Name: zerver_reaction_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_reaction_id_seq - AS integer +ALTER TABLE zulip.zerver_reaction ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_reaction_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_reaction_id_seq OWNER TO zulip; - --- --- Name: zerver_reaction_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_reaction_id_seq OWNED BY zulip.zerver_reaction.id; + CACHE 1 +); -- @@ -2338,7 +2029,7 @@ CREATE TABLE zulip.zerver_realm ( name_changes_disabled boolean NOT NULL, date_created timestamp with time zone NOT NULL, deactivated boolean NOT NULL, - notifications_stream_id integer, + new_stream_announcements_stream_id bigint, allow_message_editing boolean NOT NULL, message_content_edit_limit_seconds integer, default_language character varying(50) NOT NULL, @@ -2353,10 +2044,9 @@ CREATE TABLE zulip.zerver_realm ( inline_image_preview boolean NOT NULL, inline_url_embed_preview boolean NOT NULL, allow_edit_history boolean NOT NULL, - signup_notifications_stream_id integer, + signup_announcements_stream_id bigint, max_invites integer, message_visibility_limit integer, - upload_quota_gb integer, send_welcome_emails boolean NOT NULL, bot_creation_policy smallint NOT NULL, disallow_disposable_email_addresses boolean NOT NULL, @@ -2373,7 +2063,6 @@ CREATE TABLE zulip.zerver_realm ( avatar_changes_disabled boolean NOT NULL, video_chat_provider smallint NOT NULL, user_group_edit_policy smallint NOT NULL, - private_message_policy smallint NOT NULL, default_code_block_language text NOT NULL, wildcard_mention_policy smallint NOT NULL, deactivated_redirect character varying(128), @@ -2384,26 +2073,30 @@ CREATE TABLE zulip.zerver_realm ( add_custom_emoji_policy smallint NOT NULL, demo_organization_scheduled_deletion_date timestamp with time zone, delete_own_message_policy smallint NOT NULL, - create_private_stream_policy smallint NOT NULL, - create_public_stream_policy smallint NOT NULL, create_web_public_stream_policy smallint NOT NULL, enable_spectator_access boolean NOT NULL, want_advertise_in_communities_directory boolean NOT NULL, enable_read_receipts boolean NOT NULL, move_messages_within_stream_limit_seconds integer, move_messages_between_streams_limit_seconds integer, - create_multiuse_invite_group_id integer NOT NULL, + create_multiuse_invite_group_id bigint NOT NULL, jitsi_server_url character varying(200), enable_guest_user_indicator boolean NOT NULL, uuid uuid NOT NULL, uuid_owner_secret text NOT NULL, - can_access_all_users_group_id integer NOT NULL, + can_access_all_users_group_id bigint NOT NULL, push_notifications_enabled boolean NOT NULL, push_notifications_enabled_end_timestamp timestamp with time zone, + zulip_update_announcements_stream_id bigint, + zulip_update_announcements_level integer, + require_unique_names boolean NOT NULL, + custom_upload_quota_gb integer, + can_create_public_channel_group_id bigint NOT NULL, + can_create_private_channel_group_id bigint NOT NULL, + direct_message_initiator_group_id bigint NOT NULL, + direct_message_permission_group_id bigint NOT NULL, CONSTRAINT zerver_realm_add_custom_emoji_policy_check CHECK ((add_custom_emoji_policy >= 0)), CONSTRAINT zerver_realm_bot_creation_policy_check CHECK ((bot_creation_policy >= 0)), - CONSTRAINT zerver_realm_create_private_stream_policy_check CHECK ((create_private_stream_policy >= 0)), - CONSTRAINT zerver_realm_create_public_stream_policy_check CHECK ((create_public_stream_policy >= 0)), CONSTRAINT zerver_realm_create_web_public_stream_policy_check CHECK ((create_web_public_stream_policy >= 0)), CONSTRAINT zerver_realm_delete_own_message_policy_check CHECK ((delete_own_message_policy >= 0)), CONSTRAINT zerver_realm_edit_topic_policy_check CHECK ((edit_topic_policy >= 0)), @@ -2420,11 +2113,11 @@ CREATE TABLE zulip.zerver_realm ( CONSTRAINT zerver_realm_night_logo_version_check CHECK ((night_logo_version >= 0)), CONSTRAINT zerver_realm_org_type_check CHECK ((org_type >= 0)), CONSTRAINT zerver_realm_plan_type_check CHECK ((plan_type >= 0)), - CONSTRAINT zerver_realm_private_message_policy_check CHECK ((private_message_policy >= 0)), CONSTRAINT zerver_realm_user_group_edit_policy_check CHECK ((user_group_edit_policy >= 0)), CONSTRAINT zerver_realm_video_chat_provider_check CHECK ((video_chat_provider >= 0)), CONSTRAINT zerver_realm_waiting_period_threshold_check CHECK ((waiting_period_threshold >= 0)), - CONSTRAINT zerver_realm_wildcard_mention_policy_check CHECK ((wildcard_mention_policy >= 0)) + CONSTRAINT zerver_realm_wildcard_mention_policy_check CHECK ((wildcard_mention_policy >= 0)), + CONSTRAINT zerver_realm_zulip_update_announcements_level_check CHECK ((zulip_update_announcements_level >= 0)) ); @@ -2434,22 +2127,14 @@ ALTER TABLE zulip.zerver_realm OWNER TO zulip; -- Name: zerver_realm_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_realm_id_seq - AS integer +ALTER TABLE zulip.zerver_realm ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_realm_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_realm_id_seq OWNER TO zulip; - --- --- Name: zerver_realm_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_realm_id_seq OWNED BY zulip.zerver_realm.id; + CACHE 1 +); -- @@ -2457,7 +2142,7 @@ ALTER SEQUENCE zulip.zerver_realm_id_seq OWNED BY zulip.zerver_realm.id; -- CREATE TABLE zulip.zerver_realmdomain ( - id integer NOT NULL, + id bigint NOT NULL, domain character varying(80) NOT NULL, realm_id integer NOT NULL, allow_subdomains boolean NOT NULL @@ -2470,22 +2155,14 @@ ALTER TABLE zulip.zerver_realmdomain OWNER TO zulip; -- Name: zerver_realmalias_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_realmalias_id_seq - AS integer +ALTER TABLE zulip.zerver_realmdomain ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_realmalias_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_realmalias_id_seq OWNER TO zulip; - --- --- Name: zerver_realmalias_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_realmalias_id_seq OWNED BY zulip.zerver_realmdomain.id; + CACHE 1 +); -- @@ -2493,18 +2170,18 @@ ALTER SEQUENCE zulip.zerver_realmalias_id_seq OWNED BY zulip.zerver_realmdomain. -- CREATE TABLE zulip.zerver_realmauditlog ( - id integer NOT NULL, + id bigint NOT NULL, backfilled boolean NOT NULL, event_time timestamp with time zone NOT NULL, acting_user_id integer, - modified_stream_id integer, + modified_stream_id bigint, modified_user_id integer, realm_id integer NOT NULL, event_last_message_id integer, event_type smallint NOT NULL, extra_data jsonb NOT NULL, - modified_user_group_id integer, - CONSTRAINT zerver_realmauditlog_event_type_bd8f3978_check CHECK ((event_type >= 0)) + modified_user_group_id bigint, + CONSTRAINT zerver_realmauditlog_event_type_int_check CHECK ((event_type >= 0)) ); @@ -2514,22 +2191,14 @@ ALTER TABLE zulip.zerver_realmauditlog OWNER TO zulip; -- Name: zerver_realmauditlog_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_realmauditlog_id_seq - AS integer +ALTER TABLE zulip.zerver_realmauditlog ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_realmauditlog_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_realmauditlog_id_seq OWNER TO zulip; - --- --- Name: zerver_realmauditlog_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_realmauditlog_id_seq OWNED BY zulip.zerver_realmauditlog.id; + CACHE 1 +); -- @@ -2537,7 +2206,7 @@ ALTER SEQUENCE zulip.zerver_realmauditlog_id_seq OWNED BY zulip.zerver_realmaudi -- CREATE TABLE zulip.zerver_realmauthenticationmethod ( - id integer NOT NULL, + id bigint NOT NULL, name character varying(80) NOT NULL, realm_id integer NOT NULL ); @@ -2564,7 +2233,7 @@ ALTER TABLE zulip.zerver_realmauthenticationmethod ALTER COLUMN id ADD GENERATED -- CREATE TABLE zulip.zerver_realmemoji ( - id integer NOT NULL, + id bigint NOT NULL, name text NOT NULL, realm_id integer NOT NULL, author_id integer, @@ -2580,22 +2249,14 @@ ALTER TABLE zulip.zerver_realmemoji OWNER TO zulip; -- Name: zerver_realmemoji_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_realmemoji_id_seq - AS integer +ALTER TABLE zulip.zerver_realmemoji ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_realmemoji_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_realmemoji_id_seq OWNER TO zulip; - --- --- Name: zerver_realmemoji_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_realmemoji_id_seq OWNED BY zulip.zerver_realmemoji.id; + CACHE 1 +); -- @@ -2603,7 +2264,7 @@ ALTER SEQUENCE zulip.zerver_realmemoji_id_seq OWNED BY zulip.zerver_realmemoji.i -- CREATE TABLE zulip.zerver_realmfilter ( - id integer NOT NULL, + id bigint NOT NULL, pattern text NOT NULL, realm_id integer NOT NULL, url_template text NOT NULL, @@ -2617,22 +2278,14 @@ ALTER TABLE zulip.zerver_realmfilter OWNER TO zulip; -- Name: zerver_realmfilter_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_realmfilter_id_seq - AS integer +ALTER TABLE zulip.zerver_realmfilter ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_realmfilter_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_realmfilter_id_seq OWNER TO zulip; - --- --- Name: zerver_realmfilter_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_realmfilter_id_seq OWNED BY zulip.zerver_realmfilter.id; + CACHE 1 +); -- @@ -2640,7 +2293,7 @@ ALTER SEQUENCE zulip.zerver_realmfilter_id_seq OWNED BY zulip.zerver_realmfilter -- CREATE TABLE zulip.zerver_realmplayground ( - id integer NOT NULL, + id bigint NOT NULL, name text NOT NULL, pygments_language character varying(40) NOT NULL, realm_id integer NOT NULL, @@ -2654,22 +2307,14 @@ ALTER TABLE zulip.zerver_realmplayground OWNER TO zulip; -- Name: zerver_realmplayground_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_realmplayground_id_seq - AS integer +ALTER TABLE zulip.zerver_realmplayground ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_realmplayground_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_realmplayground_id_seq OWNER TO zulip; - --- --- Name: zerver_realmplayground_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_realmplayground_id_seq OWNED BY zulip.zerver_realmplayground.id; + CACHE 1 +); -- @@ -2677,7 +2322,7 @@ ALTER SEQUENCE zulip.zerver_realmplayground_id_seq OWNED BY zulip.zerver_realmpl -- CREATE TABLE zulip.zerver_realmreactivationstatus ( - id integer NOT NULL, + id bigint NOT NULL, status integer NOT NULL, realm_id integer NOT NULL ); @@ -2704,7 +2349,7 @@ ALTER TABLE zulip.zerver_realmreactivationstatus ALTER COLUMN id ADD GENERATED B -- CREATE TABLE zulip.zerver_realmuserdefault ( - id integer NOT NULL, + id bigint NOT NULL, enter_sends boolean NOT NULL, left_side_userlist boolean NOT NULL, default_language character varying(50) NOT NULL, @@ -2757,6 +2402,12 @@ CREATE TABLE zulip.zerver_realmuserdefault ( automatically_follow_topics_policy smallint NOT NULL, automatically_unmute_topics_in_muted_streams_policy smallint NOT NULL, automatically_follow_topics_where_mentioned boolean NOT NULL, + web_font_size_px smallint NOT NULL, + web_line_height_percent smallint NOT NULL, + receives_typing_notifications boolean NOT NULL, + web_navigate_to_sent_message boolean NOT NULL, + web_channel_default_view smallint DEFAULT 1 NOT NULL, + web_animate_image_previews text NOT NULL, CONSTRAINT zerver_realmuserdefault_automatically_follow_topics_polic_check CHECK ((automatically_follow_topics_policy >= 0)), CONSTRAINT zerver_realmuserdefault_automatically_unmute_topics_in_mu_check CHECK ((automatically_unmute_topics_in_muted_streams_policy >= 0)), CONSTRAINT zerver_realmuserdefault_color_scheme_check CHECK ((color_scheme >= 0)), @@ -2765,6 +2416,8 @@ CREATE TABLE zulip.zerver_realmuserdefault ( CONSTRAINT zerver_realmuserdefault_email_address_visibility_check CHECK ((email_address_visibility >= 0)), CONSTRAINT zerver_realmuserdefault_realm_name_in_email_notifications_check CHECK ((realm_name_in_email_notifications_policy >= 0)), CONSTRAINT zerver_realmuserdefault_user_list_style_check CHECK ((user_list_style >= 0)), + CONSTRAINT zerver_realmuserdefault_web_font_size_px_check CHECK ((web_font_size_px >= 0)), + CONSTRAINT zerver_realmuserdefault_web_line_height_percent_check CHECK ((web_line_height_percent >= 0)), CONSTRAINT zerver_realmuserdefault_web_stream_unreads_count_display__check CHECK ((web_stream_unreads_count_display_policy >= 0)) ); @@ -2775,22 +2428,14 @@ ALTER TABLE zulip.zerver_realmuserdefault OWNER TO zulip; -- Name: zerver_realmuserdefault_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_realmuserdefault_id_seq - AS integer +ALTER TABLE zulip.zerver_realmuserdefault ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_realmuserdefault_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_realmuserdefault_id_seq OWNER TO zulip; - --- --- Name: zerver_realmuserdefault_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_realmuserdefault_id_seq OWNED BY zulip.zerver_realmuserdefault.id; + CACHE 1 +); -- @@ -2811,22 +2456,14 @@ ALTER TABLE zulip.zerver_recipient OWNER TO zulip; -- Name: zerver_recipient_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_recipient_id_seq - AS integer +ALTER TABLE zulip.zerver_recipient ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_recipient_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_recipient_id_seq OWNER TO zulip; - --- --- Name: zerver_recipient_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_recipient_id_seq OWNED BY zulip.zerver_recipient.id; + CACHE 1 +); -- @@ -2834,7 +2471,7 @@ ALTER SEQUENCE zulip.zerver_recipient_id_seq OWNED BY zulip.zerver_recipient.id; -- CREATE TABLE zulip.zerver_scheduledemail ( - id integer NOT NULL, + id bigint NOT NULL, scheduled_timestamp timestamp with time zone NOT NULL, data text NOT NULL, address character varying(254), @@ -2850,22 +2487,14 @@ ALTER TABLE zulip.zerver_scheduledemail OWNER TO zulip; -- Name: zerver_scheduledemail_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_scheduledemail_id_seq - AS integer +ALTER TABLE zulip.zerver_scheduledemail ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_scheduledemail_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_scheduledemail_id_seq OWNER TO zulip; - --- --- Name: zerver_scheduledemail_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_scheduledemail_id_seq OWNED BY zulip.zerver_scheduledemail.id; + CACHE 1 +); -- @@ -2873,8 +2502,8 @@ ALTER SEQUENCE zulip.zerver_scheduledemail_id_seq OWNED BY zulip.zerver_schedule -- CREATE TABLE zulip.zerver_scheduledemail_users ( - id integer NOT NULL, - scheduledemail_id integer NOT NULL, + id bigint NOT NULL, + scheduledemail_id bigint NOT NULL, userprofile_id integer NOT NULL ); @@ -2885,22 +2514,14 @@ ALTER TABLE zulip.zerver_scheduledemail_users OWNER TO zulip; -- Name: zerver_scheduledemail_users_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_scheduledemail_users_id_seq - AS integer +ALTER TABLE zulip.zerver_scheduledemail_users ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_scheduledemail_users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_scheduledemail_users_id_seq OWNER TO zulip; - --- --- Name: zerver_scheduledemail_users_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_scheduledemail_users_id_seq OWNED BY zulip.zerver_scheduledemail_users.id; + CACHE 1 +); -- @@ -2908,7 +2529,7 @@ ALTER SEQUENCE zulip.zerver_scheduledemail_users_id_seq OWNED BY zulip.zerver_sc -- CREATE TABLE zulip.zerver_scheduledmessage ( - id integer NOT NULL, + id bigint NOT NULL, subject character varying(60) NOT NULL, content text NOT NULL, scheduled_timestamp timestamp with time zone NOT NULL, @@ -2917,7 +2538,7 @@ CREATE TABLE zulip.zerver_scheduledmessage ( recipient_id integer NOT NULL, sender_id integer NOT NULL, sending_client_id integer NOT NULL, - stream_id integer, + stream_id bigint, delivery_type smallint NOT NULL, rendered_content text NOT NULL, has_attachment boolean NOT NULL, @@ -2935,22 +2556,14 @@ ALTER TABLE zulip.zerver_scheduledmessage OWNER TO zulip; -- Name: zerver_scheduledmessage_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_scheduledmessage_id_seq - AS integer +ALTER TABLE zulip.zerver_scheduledmessage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_scheduledmessage_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_scheduledmessage_id_seq OWNER TO zulip; - --- --- Name: zerver_scheduledmessage_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_scheduledmessage_id_seq OWNED BY zulip.zerver_scheduledmessage.id; + CACHE 1 +); -- @@ -2958,10 +2571,10 @@ ALTER SEQUENCE zulip.zerver_scheduledmessage_id_seq OWNED BY zulip.zerver_schedu -- CREATE TABLE zulip.zerver_scheduledmessagenotificationemail ( - id integer NOT NULL, + id bigint NOT NULL, trigger text NOT NULL, scheduled_timestamp timestamp with time zone NOT NULL, - mentioned_user_group_id integer, + mentioned_user_group_id bigint, message_id integer NOT NULL, user_profile_id integer NOT NULL ); @@ -2973,22 +2586,14 @@ ALTER TABLE zulip.zerver_scheduledmessagenotificationemail OWNER TO zulip; -- Name: zerver_scheduledmessagenotificationemail_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_scheduledmessagenotificationemail_id_seq - AS integer +ALTER TABLE zulip.zerver_scheduledmessagenotificationemail ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_scheduledmessagenotificationemail_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_scheduledmessagenotificationemail_id_seq OWNER TO zulip; - --- --- Name: zerver_scheduledmessagenotificationemail_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_scheduledmessagenotificationemail_id_seq OWNED BY zulip.zerver_scheduledmessagenotificationemail.id; + CACHE 1 +); -- @@ -2996,7 +2601,7 @@ ALTER SEQUENCE zulip.zerver_scheduledmessagenotificationemail_id_seq OWNED BY zu -- CREATE TABLE zulip.zerver_service ( - id integer NOT NULL, + id bigint NOT NULL, name character varying(100) NOT NULL, base_url text NOT NULL, token text NOT NULL, @@ -3012,22 +2617,14 @@ ALTER TABLE zulip.zerver_service OWNER TO zulip; -- Name: zerver_service_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_service_id_seq - AS integer +ALTER TABLE zulip.zerver_service ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_service_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_service_id_seq OWNER TO zulip; - --- --- Name: zerver_service_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_service_id_seq OWNED BY zulip.zerver_service.id; + CACHE 1 +); -- @@ -3035,7 +2632,7 @@ ALTER SEQUENCE zulip.zerver_service_id_seq OWNED BY zulip.zerver_service.id; -- CREATE TABLE zulip.zerver_stream ( - id integer NOT NULL, + id bigint NOT NULL, name character varying(60) NOT NULL, invite_only boolean NOT NULL, email_token character varying(32) NOT NULL, @@ -3051,7 +2648,8 @@ CREATE TABLE zulip.zerver_stream ( message_retention_days integer, recipient_id integer, stream_post_policy smallint NOT NULL, - can_remove_subscribers_group_id integer NOT NULL, + can_remove_subscribers_group_id bigint NOT NULL, + creator_id integer, CONSTRAINT zerver_stream_stream_post_policy_check CHECK ((stream_post_policy >= 0)) ); @@ -3062,22 +2660,14 @@ ALTER TABLE zulip.zerver_stream OWNER TO zulip; -- Name: zerver_stream_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_stream_id_seq - AS integer +ALTER TABLE zulip.zerver_stream ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_stream_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_stream_id_seq OWNER TO zulip; - --- --- Name: zerver_stream_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_stream_id_seq OWNED BY zulip.zerver_stream.id; + CACHE 1 +); -- @@ -3085,7 +2675,7 @@ ALTER SEQUENCE zulip.zerver_stream_id_seq OWNED BY zulip.zerver_stream.id; -- CREATE TABLE zulip.zerver_submessage ( - id integer NOT NULL, + id bigint NOT NULL, msg_type text NOT NULL, content text NOT NULL, message_id integer NOT NULL, @@ -3099,30 +2689,22 @@ ALTER TABLE zulip.zerver_submessage OWNER TO zulip; -- Name: zerver_submessage_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_submessage_id_seq - AS integer +ALTER TABLE zulip.zerver_submessage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_submessage_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - + CACHE 1 +); -ALTER TABLE zulip.zerver_submessage_id_seq OWNER TO zulip; -- --- Name: zerver_submessage_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_submessage_id_seq OWNED BY zulip.zerver_submessage.id; - - --- --- Name: zerver_subscription; Type: TABLE; Schema: zulip; Owner: zulip +-- Name: zerver_subscription; Type: TABLE; Schema: zulip; Owner: zulip -- CREATE TABLE zulip.zerver_subscription ( - id integer NOT NULL, + id bigint NOT NULL, active boolean NOT NULL, color character varying(10) NOT NULL, desktop_notifications boolean, @@ -3144,22 +2726,14 @@ ALTER TABLE zulip.zerver_subscription OWNER TO zulip; -- Name: zerver_subscription_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_subscription_id_seq - AS integer +ALTER TABLE zulip.zerver_subscription ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_subscription_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_subscription_id_seq OWNER TO zulip; - --- --- Name: zerver_subscription_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_subscription_id_seq OWNED BY zulip.zerver_subscription.id; + CACHE 1 +); -- @@ -3167,7 +2741,7 @@ ALTER SEQUENCE zulip.zerver_subscription_id_seq OWNED BY zulip.zerver_subscripti -- CREATE TABLE zulip.zerver_useractivity ( - id integer NOT NULL, + id bigint NOT NULL, query character varying(50) NOT NULL, count integer NOT NULL, last_visit timestamp with time zone NOT NULL, @@ -3182,22 +2756,14 @@ ALTER TABLE zulip.zerver_useractivity OWNER TO zulip; -- Name: zerver_useractivity_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_useractivity_id_seq - AS integer +ALTER TABLE zulip.zerver_useractivity ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_useractivity_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_useractivity_id_seq OWNER TO zulip; - --- --- Name: zerver_useractivity_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_useractivity_id_seq OWNED BY zulip.zerver_useractivity.id; + CACHE 1 +); -- @@ -3205,7 +2771,7 @@ ALTER SEQUENCE zulip.zerver_useractivity_id_seq OWNED BY zulip.zerver_useractivi -- CREATE TABLE zulip.zerver_useractivityinterval ( - id integer NOT NULL, + id bigint NOT NULL, start timestamp with time zone NOT NULL, "end" timestamp with time zone NOT NULL, user_profile_id integer NOT NULL @@ -3218,22 +2784,14 @@ ALTER TABLE zulip.zerver_useractivityinterval OWNER TO zulip; -- Name: zerver_useractivityinterval_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_useractivityinterval_id_seq - AS integer +ALTER TABLE zulip.zerver_useractivityinterval ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_useractivityinterval_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_useractivityinterval_id_seq OWNER TO zulip; - --- --- Name: zerver_useractivityinterval_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_useractivityinterval_id_seq OWNED BY zulip.zerver_useractivityinterval.id; + CACHE 1 +); -- @@ -3241,12 +2799,8 @@ ALTER SEQUENCE zulip.zerver_useractivityinterval_id_seq OWNED BY zulip.zerver_us -- CREATE TABLE zulip.zerver_usergroup ( - id integer NOT NULL, - name character varying(100) NOT NULL, - realm_id integer NOT NULL, - description text NOT NULL, - is_system_group boolean NOT NULL, - can_mention_group_id integer NOT NULL + id bigint NOT NULL, + realm_id integer NOT NULL ); @@ -3256,22 +2810,14 @@ ALTER TABLE zulip.zerver_usergroup OWNER TO zulip; -- Name: zerver_usergroup_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_usergroup_id_seq - AS integer +ALTER TABLE zulip.zerver_usergroup ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_usergroup_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_usergroup_id_seq OWNER TO zulip; - --- --- Name: zerver_usergroup_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_usergroup_id_seq OWNED BY zulip.zerver_usergroup.id; + CACHE 1 +); -- @@ -3279,8 +2825,8 @@ ALTER SEQUENCE zulip.zerver_usergroup_id_seq OWNED BY zulip.zerver_usergroup.id; -- CREATE TABLE zulip.zerver_usergroupmembership ( - id integer NOT NULL, - user_group_id integer NOT NULL, + id bigint NOT NULL, + user_group_id bigint NOT NULL, user_profile_id integer NOT NULL ); @@ -3291,62 +2837,56 @@ ALTER TABLE zulip.zerver_usergroupmembership OWNER TO zulip; -- Name: zerver_usergroupmembership_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_usergroupmembership_id_seq - AS integer +ALTER TABLE zulip.zerver_usergroupmembership ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_usergroupmembership_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - + CACHE 1 +); -ALTER TABLE zulip.zerver_usergroupmembership_id_seq OWNER TO zulip; -- --- Name: zerver_usergroupmembership_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip +-- Name: zerver_usermessage; Type: TABLE; Schema: zulip; Owner: zulip -- -ALTER SEQUENCE zulip.zerver_usergroupmembership_id_seq OWNED BY zulip.zerver_usergroupmembership.id; +CREATE TABLE zulip.zerver_usermessage ( + flags bigint NOT NULL, + message_id integer NOT NULL, + user_profile_id integer NOT NULL, + id bigint NOT NULL +); + +ALTER TABLE zulip.zerver_usermessage OWNER TO zulip; -- -- Name: zerver_usermessage_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -CREATE SEQUENCE zulip.zerver_usermessage_id_seq +ALTER TABLE zulip.zerver_usermessage ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_usermessage_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_usermessage_id_seq OWNER TO zulip; - --- --- Name: zerver_usermessage; Type: TABLE; Schema: zulip; Owner: zulip --- - -CREATE TABLE zulip.zerver_usermessage ( - flags bigint NOT NULL, - message_id integer NOT NULL, - user_profile_id integer NOT NULL, - id bigint DEFAULT nextval('zulip.zerver_usermessage_id_seq'::regclass) NOT NULL + CACHE 1 ); -ALTER TABLE zulip.zerver_usermessage OWNER TO zulip; - -- -- Name: zerver_userpresence; Type: TABLE; Schema: zulip; Owner: zulip -- CREATE TABLE zulip.zerver_userpresence ( - id integer NOT NULL, + id bigint NOT NULL, last_connected_time timestamp with time zone, last_active_time timestamp with time zone, realm_id integer NOT NULL, - user_profile_id integer NOT NULL + user_profile_id integer NOT NULL, + last_update_id bigint NOT NULL, + CONSTRAINT zerver_userpresence_last_update_id_check CHECK ((last_update_id >= 0)) ); @@ -3388,777 +2928,206 @@ CREATE TABLE zulip.zerver_userprofile ( enable_desktop_notifications boolean NOT NULL, enable_sounds boolean NOT NULL, enable_offline_email_notifications boolean NOT NULL, - enable_offline_push_notifications boolean NOT NULL, - enable_digest_emails boolean NOT NULL, - last_reminder timestamp with time zone, - rate_limits character varying(100) NOT NULL, - default_all_public_streams boolean NOT NULL, - enter_sends boolean NOT NULL, - twenty_four_hour_time boolean NOT NULL, - avatar_source character varying(1) NOT NULL, - tutorial_status character varying(1) NOT NULL, - onboarding_steps text NOT NULL, - bot_owner_id integer, - default_events_register_stream_id integer, - default_sending_stream_id integer, - realm_id integer NOT NULL, - left_side_userlist boolean NOT NULL, - can_forge_sender boolean NOT NULL, - bot_type smallint, - default_language character varying(50) NOT NULL, - tos_version character varying(10), - enable_online_push_notifications boolean NOT NULL, - pm_content_in_desktop_notifications boolean NOT NULL, - avatar_version smallint NOT NULL, - timezone character varying(40) NOT NULL, - emojiset character varying(20) NOT NULL, - last_active_message_id integer, - long_term_idle boolean NOT NULL, - high_contrast_mode boolean NOT NULL, - enable_stream_push_notifications boolean NOT NULL, - enable_stream_email_notifications boolean NOT NULL, - translate_emoticons boolean NOT NULL, - message_content_in_email_notifications boolean NOT NULL, - dense_mode boolean NOT NULL, - delivery_email character varying(254) NOT NULL, - starred_message_counts boolean NOT NULL, - is_billing_admin boolean NOT NULL, - enable_login_emails boolean NOT NULL, - notification_sound character varying(20) NOT NULL, - fluid_layout_width boolean NOT NULL, - demote_inactive_streams smallint NOT NULL, - avatar_hash character varying(64), - desktop_icon_count_display smallint NOT NULL, - role smallint NOT NULL, - wildcard_mentions_notify boolean NOT NULL, - recipient_id integer, - presence_enabled boolean NOT NULL, - zoom_token jsonb, - color_scheme smallint NOT NULL, - can_create_users boolean NOT NULL, - web_home_view text NOT NULL, - enable_marketing_emails boolean NOT NULL, - email_notifications_batching_period_seconds integer NOT NULL, - enable_drafts_synchronization boolean NOT NULL, - send_private_typing_notifications boolean NOT NULL, - send_stream_typing_notifications boolean NOT NULL, - send_read_receipts boolean NOT NULL, - web_escape_navigates_to_home_view boolean NOT NULL, - uuid uuid NOT NULL, - display_emoji_reaction_users boolean NOT NULL, - user_list_style smallint NOT NULL, - email_address_visibility smallint NOT NULL, - realm_name_in_email_notifications_policy smallint NOT NULL, - web_mark_read_on_scroll_policy smallint NOT NULL, - enable_followed_topic_audible_notifications boolean NOT NULL, - enable_followed_topic_desktop_notifications boolean NOT NULL, - enable_followed_topic_email_notifications boolean NOT NULL, - enable_followed_topic_push_notifications boolean NOT NULL, - enable_followed_topic_wildcard_mentions_notify boolean NOT NULL, - web_stream_unreads_count_display_policy smallint NOT NULL, - automatically_follow_topics_policy smallint NOT NULL, - automatically_unmute_topics_in_muted_streams_policy smallint NOT NULL, - automatically_follow_topics_where_mentioned boolean NOT NULL, - CONSTRAINT zerver_userprofile_automatically_follow_topics_policy_check CHECK ((automatically_follow_topics_policy >= 0)), - CONSTRAINT zerver_userprofile_automatically_unmute_topics_in_muted_s_check CHECK ((automatically_unmute_topics_in_muted_streams_policy >= 0)), - CONSTRAINT zerver_userprofile_avatar_version_check CHECK ((avatar_version >= 0)), - CONSTRAINT zerver_userprofile_bot_type_check CHECK ((bot_type >= 0)), - CONSTRAINT zerver_userprofile_color_scheme_check CHECK ((color_scheme >= 0)), - CONSTRAINT zerver_userprofile_demote_inactive_streams_check CHECK ((demote_inactive_streams >= 0)), - CONSTRAINT zerver_userprofile_desktop_icon_count_display_check CHECK ((desktop_icon_count_display >= 0)), - CONSTRAINT zerver_userprofile_email_address_visibility_check CHECK ((email_address_visibility >= 0)), - CONSTRAINT zerver_userprofile_realm_name_in_email_notifications_poli_check CHECK ((realm_name_in_email_notifications_policy >= 0)), - CONSTRAINT zerver_userprofile_role_check CHECK ((role >= 0)), - CONSTRAINT zerver_userprofile_user_list_style_check CHECK ((user_list_style >= 0)), - CONSTRAINT zerver_userprofile_web_stream_unreads_count_display_polic_check CHECK ((web_stream_unreads_count_display_policy >= 0)) -); - - -ALTER TABLE zulip.zerver_userprofile OWNER TO zulip; - --- --- Name: zerver_userprofile_groups; Type: TABLE; Schema: zulip; Owner: zulip --- - -CREATE TABLE zulip.zerver_userprofile_groups ( - id integer NOT NULL, - userprofile_id integer NOT NULL, - group_id integer NOT NULL -); - - -ALTER TABLE zulip.zerver_userprofile_groups OWNER TO zulip; - --- --- Name: zerver_userprofile_groups_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip --- - -CREATE SEQUENCE zulip.zerver_userprofile_groups_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_userprofile_groups_id_seq OWNER TO zulip; - --- --- Name: zerver_userprofile_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_userprofile_groups_id_seq OWNED BY zulip.zerver_userprofile_groups.id; - - --- --- Name: zerver_userprofile_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip --- - -CREATE SEQUENCE zulip.zerver_userprofile_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_userprofile_id_seq OWNER TO zulip; - --- --- Name: zerver_userprofile_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_userprofile_id_seq OWNED BY zulip.zerver_userprofile.id; - - --- --- Name: zerver_userprofile_user_permissions; Type: TABLE; Schema: zulip; Owner: zulip --- - -CREATE TABLE zulip.zerver_userprofile_user_permissions ( - id integer NOT NULL, - userprofile_id integer NOT NULL, - permission_id integer NOT NULL -); - - -ALTER TABLE zulip.zerver_userprofile_user_permissions OWNER TO zulip; - --- --- Name: zerver_userprofile_user_permissions_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip --- - -CREATE SEQUENCE zulip.zerver_userprofile_user_permissions_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_userprofile_user_permissions_id_seq OWNER TO zulip; - --- --- Name: zerver_userprofile_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_userprofile_user_permissions_id_seq OWNED BY zulip.zerver_userprofile_user_permissions.id; - - --- --- Name: zerver_userstatus; Type: TABLE; Schema: zulip; Owner: zulip --- - -CREATE TABLE zulip.zerver_userstatus ( - id integer NOT NULL, - "timestamp" timestamp with time zone NOT NULL, - client_id integer NOT NULL, - user_profile_id integer NOT NULL, - status_text character varying(255) NOT NULL, - emoji_code text NOT NULL, - emoji_name text NOT NULL, - reaction_type character varying(30) NOT NULL -); - - -ALTER TABLE zulip.zerver_userstatus OWNER TO zulip; - --- --- Name: zerver_userstatus_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip --- - -CREATE SEQUENCE zulip.zerver_userstatus_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE zulip.zerver_userstatus_id_seq OWNER TO zulip; - --- --- Name: zerver_userstatus_id_seq; Type: SEQUENCE OWNED BY; Schema: zulip; Owner: zulip --- - -ALTER SEQUENCE zulip.zerver_userstatus_id_seq OWNED BY zulip.zerver_userstatus.id; - - --- --- Name: analytics_fillstate id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.analytics_fillstate ALTER COLUMN id SET DEFAULT nextval('zulip.analytics_fillstate_id_seq'::regclass); - - --- --- Name: analytics_installationcount id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.analytics_installationcount ALTER COLUMN id SET DEFAULT nextval('zulip.analytics_installationcount_id_seq'::regclass); - - --- --- Name: analytics_realmcount id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.analytics_realmcount ALTER COLUMN id SET DEFAULT nextval('zulip.analytics_realmcount_id_seq'::regclass); - - --- --- Name: analytics_streamcount id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.analytics_streamcount ALTER COLUMN id SET DEFAULT nextval('zulip.analytics_streamcount_id_seq'::regclass); - - --- --- Name: analytics_usercount id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.analytics_usercount ALTER COLUMN id SET DEFAULT nextval('zulip.analytics_usercount_id_seq'::regclass); - - --- --- Name: auth_group id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.auth_group ALTER COLUMN id SET DEFAULT nextval('zulip.auth_group_id_seq'::regclass); - - --- --- Name: auth_group_permissions id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.auth_group_permissions ALTER COLUMN id SET DEFAULT nextval('zulip.auth_group_permissions_id_seq'::regclass); - - --- --- Name: auth_permission id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.auth_permission ALTER COLUMN id SET DEFAULT nextval('zulip.auth_permission_id_seq'::regclass); - - --- --- Name: confirmation_confirmation id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.confirmation_confirmation ALTER COLUMN id SET DEFAULT nextval('zulip.confirmation_confirmation_id_seq'::regclass); - - --- --- Name: confirmation_realmcreationkey id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.confirmation_realmcreationkey ALTER COLUMN id SET DEFAULT nextval('zulip.confirmation_realmcreationkey_id_seq'::regclass); - - --- --- Name: django_content_type id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.django_content_type ALTER COLUMN id SET DEFAULT nextval('zulip.django_content_type_id_seq'::regclass); - - --- --- Name: django_migrations id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.django_migrations ALTER COLUMN id SET DEFAULT nextval('zulip.django_migrations_id_seq'::regclass); - - --- --- Name: fts_update_log id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.fts_update_log ALTER COLUMN id SET DEFAULT nextval('zulip.fts_update_log_id_seq'::regclass); - - --- --- Name: otp_static_staticdevice id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.otp_static_staticdevice ALTER COLUMN id SET DEFAULT nextval('zulip.otp_static_staticdevice_id_seq'::regclass); - - --- --- Name: otp_static_statictoken id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.otp_static_statictoken ALTER COLUMN id SET DEFAULT nextval('zulip.otp_static_statictoken_id_seq'::regclass); - - --- --- Name: otp_totp_totpdevice id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.otp_totp_totpdevice ALTER COLUMN id SET DEFAULT nextval('zulip.otp_totp_totpdevice_id_seq'::regclass); - - --- --- Name: social_auth_association id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.social_auth_association ALTER COLUMN id SET DEFAULT nextval('zulip.social_auth_association_id_seq'::regclass); - - --- --- Name: social_auth_code id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.social_auth_code ALTER COLUMN id SET DEFAULT nextval('zulip.social_auth_code_id_seq'::regclass); - - --- --- Name: social_auth_nonce id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.social_auth_nonce ALTER COLUMN id SET DEFAULT nextval('zulip.social_auth_nonce_id_seq'::regclass); - - --- --- Name: social_auth_partial id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.social_auth_partial ALTER COLUMN id SET DEFAULT nextval('zulip.social_auth_partial_id_seq'::regclass); - - --- --- Name: social_auth_usersocialauth id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.social_auth_usersocialauth ALTER COLUMN id SET DEFAULT nextval('zulip.social_auth_usersocialauth_id_seq'::regclass); - - --- --- Name: two_factor_phonedevice id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.two_factor_phonedevice ALTER COLUMN id SET DEFAULT nextval('zulip.two_factor_phonedevice_id_seq'::regclass); - - --- --- Name: zerver_alertword id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_alertword ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_alertword_id_seq'::regclass); - - --- --- Name: zerver_archivedattachment id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivedattachment ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_archivedattachment_id_seq'::regclass); - - --- --- Name: zerver_archivedattachment_messages id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivedattachment_messages ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_archivedattachment_messages_id_seq'::regclass); - - --- --- Name: zerver_archivedmessage id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivedmessage ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_archivedmessage_id_seq'::regclass); - - --- --- Name: zerver_archivedreaction id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivedreaction ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_archivedreaction_id_seq'::regclass); - - --- --- Name: zerver_archivedsubmessage id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivedsubmessage ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_archivedsubmessage_id_seq'::regclass); - - --- --- Name: zerver_archivedusermessage id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivedusermessage ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_archivedusermessage_id_seq'::regclass); - - --- --- Name: zerver_archivetransaction id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivetransaction ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_archivetransaction_id_seq'::regclass); - - --- --- Name: zerver_attachment id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_attachment ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_attachment_id_seq'::regclass); - - --- --- Name: zerver_attachment_messages id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_attachment_messages ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_attachment_messages_id_seq'::regclass); - - --- --- Name: zerver_botconfigdata id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_botconfigdata ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_botuserconfigdata_id_seq'::regclass); - - --- --- Name: zerver_botstoragedata id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_botstoragedata ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_botuserstatedata_id_seq'::regclass); - - --- --- Name: zerver_client id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_client ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_client_id_seq'::regclass); - - --- --- Name: zerver_customprofilefield id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_customprofilefield ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_customprofilefield_id_seq'::regclass); - - --- --- Name: zerver_customprofilefieldvalue id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_customprofilefieldvalue ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_customprofilefieldvalue_id_seq'::regclass); - - --- --- Name: zerver_defaultstream id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_defaultstream ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_defaultstream_id_seq'::regclass); - - --- --- Name: zerver_defaultstreamgroup id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_defaultstreamgroup ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_defaultstreamgroup_id_seq'::regclass); - - --- --- Name: zerver_defaultstreamgroup_streams id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_defaultstreamgroup_streams ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_defaultstreamgroup_streams_id_seq'::regclass); - - --- --- Name: zerver_draft id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_draft ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_draft_id_seq'::regclass); - - --- --- Name: zerver_emailchangestatus id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_emailchangestatus ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_emailchangestatus_id_seq'::regclass); - - --- --- Name: zerver_groupgroupmembership id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_groupgroupmembership ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_groupgroupmembership_id_seq'::regclass); - - --- --- Name: zerver_huddle id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_huddle ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_huddle_id_seq'::regclass); - - --- --- Name: zerver_message id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_message ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_message_id_seq'::regclass); - - --- --- Name: zerver_missedmessageemailaddress id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_missedmessageemailaddress ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_missedmessageemailaddress_id_seq'::regclass); - - --- --- Name: zerver_multiuseinvite id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_multiuseinvite ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_multiuseinvite_id_seq'::regclass); - - --- --- Name: zerver_multiuseinvite_streams id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_multiuseinvite_streams ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_multiuseinvite_streams_id_seq'::regclass); - - --- --- Name: zerver_muteduser id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_muteduser ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_muteduser_id_seq'::regclass); - - --- --- Name: zerver_onboardingstep id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_onboardingstep ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_onboardingstep_id_seq'::regclass); - - --- --- Name: zerver_preregistrationuser id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_preregistrationuser ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_preregistrationuser_id_seq'::regclass); - - --- --- Name: zerver_preregistrationuser_streams id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_preregistrationuser_streams ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_preregistrationuser_streams_id_seq'::regclass); - - --- --- Name: zerver_pushdevicetoken id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_pushdevicetoken ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_pushdevicetoken_id_seq'::regclass); - - --- --- Name: zerver_reaction id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_reaction ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_reaction_id_seq'::regclass); - - --- --- Name: zerver_realm id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_realm ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_realm_id_seq'::regclass); - - --- --- Name: zerver_realmauditlog id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_realmauditlog ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_realmauditlog_id_seq'::regclass); - - --- --- Name: zerver_realmdomain id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_realmdomain ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_realmalias_id_seq'::regclass); - - --- --- Name: zerver_realmemoji id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_realmemoji ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_realmemoji_id_seq'::regclass); - - --- --- Name: zerver_realmfilter id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_realmfilter ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_realmfilter_id_seq'::regclass); - - --- --- Name: zerver_realmplayground id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_realmplayground ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_realmplayground_id_seq'::regclass); - - --- --- Name: zerver_realmuserdefault id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_realmuserdefault ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_realmuserdefault_id_seq'::regclass); - - --- --- Name: zerver_recipient id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_recipient ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_recipient_id_seq'::regclass); - - --- --- Name: zerver_scheduledemail id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_scheduledemail ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_scheduledemail_id_seq'::regclass); - - --- --- Name: zerver_scheduledemail_users id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_scheduledemail_users ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_scheduledemail_users_id_seq'::regclass); - - --- --- Name: zerver_scheduledmessage id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_scheduledmessage ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_scheduledmessage_id_seq'::regclass); - - --- --- Name: zerver_scheduledmessagenotificationemail id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_scheduledmessagenotificationemail ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_scheduledmessagenotificationemail_id_seq'::regclass); - - --- --- Name: zerver_service id; Type: DEFAULT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_service ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_service_id_seq'::regclass); - - --- --- Name: zerver_stream id; Type: DEFAULT; Schema: zulip; Owner: zulip --- + enable_offline_push_notifications boolean NOT NULL, + enable_digest_emails boolean NOT NULL, + last_reminder timestamp with time zone, + rate_limits character varying(100) NOT NULL, + default_all_public_streams boolean NOT NULL, + enter_sends boolean NOT NULL, + twenty_four_hour_time boolean NOT NULL, + avatar_source character varying(1) NOT NULL, + tutorial_status character varying(1) NOT NULL, + bot_owner_id integer, + default_events_register_stream_id bigint, + default_sending_stream_id bigint, + realm_id integer NOT NULL, + left_side_userlist boolean NOT NULL, + can_forge_sender boolean NOT NULL, + bot_type smallint, + default_language character varying(50) NOT NULL, + tos_version character varying(10), + enable_online_push_notifications boolean NOT NULL, + pm_content_in_desktop_notifications boolean NOT NULL, + avatar_version smallint NOT NULL, + timezone character varying(40) NOT NULL, + emojiset character varying(20) NOT NULL, + last_active_message_id integer, + long_term_idle boolean NOT NULL, + high_contrast_mode boolean NOT NULL, + enable_stream_push_notifications boolean NOT NULL, + enable_stream_email_notifications boolean NOT NULL, + translate_emoticons boolean NOT NULL, + message_content_in_email_notifications boolean NOT NULL, + dense_mode boolean NOT NULL, + delivery_email character varying(254) NOT NULL, + starred_message_counts boolean NOT NULL, + is_billing_admin boolean NOT NULL, + enable_login_emails boolean NOT NULL, + notification_sound character varying(20) NOT NULL, + fluid_layout_width boolean NOT NULL, + demote_inactive_streams smallint NOT NULL, + avatar_hash character varying(64), + desktop_icon_count_display smallint NOT NULL, + role smallint NOT NULL, + wildcard_mentions_notify boolean NOT NULL, + recipient_id integer, + presence_enabled boolean NOT NULL, + zoom_token jsonb, + color_scheme smallint NOT NULL, + can_create_users boolean NOT NULL, + web_home_view text NOT NULL, + enable_marketing_emails boolean NOT NULL, + email_notifications_batching_period_seconds integer NOT NULL, + enable_drafts_synchronization boolean NOT NULL, + send_private_typing_notifications boolean NOT NULL, + send_stream_typing_notifications boolean NOT NULL, + send_read_receipts boolean NOT NULL, + web_escape_navigates_to_home_view boolean NOT NULL, + uuid uuid NOT NULL, + display_emoji_reaction_users boolean NOT NULL, + user_list_style smallint NOT NULL, + email_address_visibility smallint NOT NULL, + realm_name_in_email_notifications_policy smallint NOT NULL, + web_mark_read_on_scroll_policy smallint NOT NULL, + enable_followed_topic_audible_notifications boolean NOT NULL, + enable_followed_topic_desktop_notifications boolean NOT NULL, + enable_followed_topic_email_notifications boolean NOT NULL, + enable_followed_topic_push_notifications boolean NOT NULL, + enable_followed_topic_wildcard_mentions_notify boolean NOT NULL, + web_stream_unreads_count_display_policy smallint NOT NULL, + automatically_follow_topics_policy smallint NOT NULL, + automatically_unmute_topics_in_muted_streams_policy smallint NOT NULL, + automatically_follow_topics_where_mentioned boolean NOT NULL, + web_font_size_px smallint NOT NULL, + web_line_height_percent smallint NOT NULL, + receives_typing_notifications boolean NOT NULL, + web_navigate_to_sent_message boolean NOT NULL, + web_channel_default_view smallint DEFAULT 1 NOT NULL, + web_animate_image_previews text NOT NULL, + CONSTRAINT zerver_userprofile_automatically_follow_topics_policy_check CHECK ((automatically_follow_topics_policy >= 0)), + CONSTRAINT zerver_userprofile_automatically_unmute_topics_in_muted_s_check CHECK ((automatically_unmute_topics_in_muted_streams_policy >= 0)), + CONSTRAINT zerver_userprofile_avatar_version_check CHECK ((avatar_version >= 0)), + CONSTRAINT zerver_userprofile_bot_type_check CHECK ((bot_type >= 0)), + CONSTRAINT zerver_userprofile_color_scheme_check CHECK ((color_scheme >= 0)), + CONSTRAINT zerver_userprofile_demote_inactive_streams_check CHECK ((demote_inactive_streams >= 0)), + CONSTRAINT zerver_userprofile_desktop_icon_count_display_check CHECK ((desktop_icon_count_display >= 0)), + CONSTRAINT zerver_userprofile_email_address_visibility_check CHECK ((email_address_visibility >= 0)), + CONSTRAINT zerver_userprofile_realm_name_in_email_notifications_poli_check CHECK ((realm_name_in_email_notifications_policy >= 0)), + CONSTRAINT zerver_userprofile_role_check CHECK ((role >= 0)), + CONSTRAINT zerver_userprofile_user_list_style_check CHECK ((user_list_style >= 0)), + CONSTRAINT zerver_userprofile_web_font_size_px_check CHECK ((web_font_size_px >= 0)), + CONSTRAINT zerver_userprofile_web_line_height_percent_check CHECK ((web_line_height_percent >= 0)), + CONSTRAINT zerver_userprofile_web_stream_unreads_count_display_polic_check CHECK ((web_stream_unreads_count_display_policy >= 0)) +); -ALTER TABLE ONLY zulip.zerver_stream ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_stream_id_seq'::regclass); +ALTER TABLE zulip.zerver_userprofile OWNER TO zulip; -- --- Name: zerver_submessage id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: zerver_userprofile_groups; Type: TABLE; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_submessage ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_submessage_id_seq'::regclass); - - --- --- Name: zerver_subscription id; Type: DEFAULT; Schema: zulip; Owner: zulip --- +CREATE TABLE zulip.zerver_userprofile_groups ( + id bigint NOT NULL, + userprofile_id integer NOT NULL, + group_id integer NOT NULL +); -ALTER TABLE ONLY zulip.zerver_subscription ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_subscription_id_seq'::regclass); +ALTER TABLE zulip.zerver_userprofile_groups OWNER TO zulip; -- --- Name: zerver_useractivity id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: zerver_userprofile_groups_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_useractivity ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_useractivity_id_seq'::regclass); +ALTER TABLE zulip.zerver_userprofile_groups ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_userprofile_groups_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); -- --- Name: zerver_useractivityinterval id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: zerver_userprofile_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_useractivityinterval ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_useractivityinterval_id_seq'::regclass); +ALTER TABLE zulip.zerver_userprofile ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_userprofile_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); -- --- Name: zerver_usergroup id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: zerver_userprofile_user_permissions; Type: TABLE; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_usergroup ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_usergroup_id_seq'::regclass); - - --- --- Name: zerver_usergroupmembership id; Type: DEFAULT; Schema: zulip; Owner: zulip --- +CREATE TABLE zulip.zerver_userprofile_user_permissions ( + id bigint NOT NULL, + userprofile_id integer NOT NULL, + permission_id integer NOT NULL +); -ALTER TABLE ONLY zulip.zerver_usergroupmembership ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_usergroupmembership_id_seq'::regclass); +ALTER TABLE zulip.zerver_userprofile_user_permissions OWNER TO zulip; -- --- Name: zerver_userprofile id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: zerver_userprofile_user_permissions_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_userprofile ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_userprofile_id_seq'::regclass); +ALTER TABLE zulip.zerver_userprofile_user_permissions ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_userprofile_user_permissions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); -- --- Name: zerver_userprofile_groups id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: zerver_userstatus; Type: TABLE; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_userprofile_groups ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_userprofile_groups_id_seq'::regclass); - - --- --- Name: zerver_userprofile_user_permissions id; Type: DEFAULT; Schema: zulip; Owner: zulip --- +CREATE TABLE zulip.zerver_userstatus ( + id bigint NOT NULL, + "timestamp" timestamp with time zone NOT NULL, + client_id integer NOT NULL, + user_profile_id integer NOT NULL, + status_text character varying(255) NOT NULL, + emoji_code text NOT NULL, + emoji_name text NOT NULL, + reaction_type character varying(30) NOT NULL +); -ALTER TABLE ONLY zulip.zerver_userprofile_user_permissions ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_userprofile_user_permissions_id_seq'::regclass); +ALTER TABLE zulip.zerver_userstatus OWNER TO zulip; -- --- Name: zerver_userstatus id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: zerver_userstatus_id_seq; Type: SEQUENCE; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_userstatus ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_userstatus_id_seq'::regclass); +ALTER TABLE zulip.zerver_userstatus ALTER COLUMN id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME zulip.zerver_userstatus_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); -- --- Name: zerver_usertopic id; Type: DEFAULT; Schema: zulip; Owner: zulip +-- Name: fts_update_log id; Type: DEFAULT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_usertopic ALTER COLUMN id SET DEFAULT nextval('zulip.zerver_mutedtopic_id_seq'::regclass); +ALTER TABLE ONLY zulip.fts_update_log ALTER COLUMN id SET DEFAULT nextval('zulip.fts_update_log_id_seq'::regclass); -- @@ -4182,7 +3151,6 @@ COPY zulip.analytics_installationcount (id, property, end_time, value, subgroup) -- COPY zulip.analytics_realmcount (id, realm_id, property, end_time, value, subgroup) FROM stdin; -1 2 active_users_log:is_bot:day 2022-04-24 00:00:00+00 1 False \. @@ -4199,8 +3167,8 @@ COPY zulip.analytics_streamcount (id, realm_id, stream_id, property, end_time, v -- COPY zulip.analytics_usercount (id, realm_id, user_id, property, end_time, value, subgroup) FROM stdin; -1 2 8 messages_read::hour 2022-04-23 09:00:00+00 1 \N -2 2 8 messages_read_interactions::hour 2022-04-23 09:00:00+00 1 \N +1 2 8 messages_read::hour 2024-08-02 10:00:00+00 1 \N +2 2 8 messages_read_interactions::hour 2024-08-02 10:00:00+00 1 \N \. @@ -4261,278 +3229,282 @@ COPY zulip.auth_permission (id, name, content_type_id, codename) FROM stdin; 34 Can change default stream 9 change_defaultstream 35 Can delete default stream 9 delete_defaultstream 36 Can view default stream 9 view_defaultstream -37 Can add huddle 10 add_huddle -38 Can change huddle 10 change_huddle -39 Can delete huddle 10 delete_huddle -40 Can view huddle 10 view_huddle -41 Can add message 11 add_message -42 Can change message 11 change_message -43 Can delete message 11 delete_message -44 Can view message 11 view_message -45 Can add preregistration user 12 add_preregistrationuser -46 Can change preregistration user 12 change_preregistrationuser -47 Can delete preregistration user 12 delete_preregistrationuser -48 Can view preregistration user 12 view_preregistrationuser -49 Can add push device token 13 add_pushdevicetoken -50 Can change push device token 13 change_pushdevicetoken -51 Can delete push device token 13 delete_pushdevicetoken -52 Can view push device token 13 view_pushdevicetoken -53 Can add realm 14 add_realm -54 Can change realm 14 change_realm -55 Can delete realm 14 delete_realm -56 Can view realm 14 view_realm -57 Can add realm emoji 15 add_realmemoji -58 Can change realm emoji 15 change_realmemoji -59 Can delete realm emoji 15 delete_realmemoji -60 Can view realm emoji 15 view_realmemoji -61 Can add realm filter 16 add_realmfilter -62 Can change realm filter 16 change_realmfilter -63 Can delete realm filter 16 delete_realmfilter -64 Can view realm filter 16 view_realmfilter -65 Can add recipient 17 add_recipient -66 Can change recipient 17 change_recipient -67 Can delete recipient 17 delete_recipient -68 Can view recipient 17 view_recipient -69 Can add stream 18 add_stream -70 Can change stream 18 change_stream -71 Can delete stream 18 delete_stream -72 Can view stream 18 view_stream -73 Can add subscription 19 add_subscription -74 Can change subscription 19 change_subscription -75 Can delete subscription 19 delete_subscription -76 Can view subscription 19 view_subscription -77 Can add user activity 20 add_useractivity -78 Can change user activity 20 change_useractivity -79 Can delete user activity 20 delete_useractivity -80 Can view user activity 20 view_useractivity -81 Can add user activity interval 21 add_useractivityinterval -82 Can change user activity interval 21 change_useractivityinterval -83 Can delete user activity interval 21 delete_useractivityinterval -84 Can view user activity interval 21 view_useractivityinterval -85 Can add user message 22 add_usermessage -86 Can change user message 22 change_usermessage -87 Can delete user message 22 delete_usermessage -88 Can view user message 22 view_usermessage -89 Can add user presence 23 add_userpresence -90 Can change user presence 23 change_userpresence -91 Can delete user presence 23 delete_userpresence -92 Can view user presence 23 view_userpresence -93 Can add attachment 24 add_attachment -94 Can change attachment 24 change_attachment -95 Can delete attachment 24 delete_attachment -96 Can view attachment 24 view_attachment -97 Can add reaction 25 add_reaction -98 Can change reaction 25 change_reaction -99 Can delete reaction 25 delete_reaction -100 Can view reaction 25 view_reaction -101 Can add email change status 26 add_emailchangestatus -102 Can change email change status 26 change_emailchangestatus -103 Can delete email change status 26 delete_emailchangestatus -104 Can view email change status 26 view_emailchangestatus -105 Can add realm audit log 27 add_realmauditlog -106 Can change realm audit log 27 change_realmauditlog -107 Can delete realm audit log 27 delete_realmauditlog -108 Can view realm audit log 27 view_realmauditlog -109 Can add archived attachment 28 add_archivedattachment -110 Can change archived attachment 28 change_archivedattachment -111 Can delete archived attachment 28 delete_archivedattachment -112 Can view archived attachment 28 view_archivedattachment -113 Can add archived message 29 add_archivedmessage -114 Can change archived message 29 change_archivedmessage -115 Can delete archived message 29 delete_archivedmessage -116 Can view archived message 29 view_archivedmessage -117 Can add archived user message 30 add_archivedusermessage -118 Can change archived user message 30 change_archivedusermessage -119 Can delete archived user message 30 delete_archivedusermessage -120 Can view archived user message 30 view_archivedusermessage -121 Can add user hotspot 31 add_userhotspot -122 Can change user hotspot 31 change_userhotspot -123 Can delete user hotspot 31 delete_userhotspot -124 Can view user hotspot 31 view_userhotspot -125 Can add realm domain 32 add_realmdomain -126 Can change realm domain 32 change_realmdomain -127 Can delete realm domain 32 delete_realmdomain -128 Can view realm domain 32 view_realmdomain -129 Can add custom profile field 33 add_customprofilefield -130 Can change custom profile field 33 change_customprofilefield -131 Can delete custom profile field 33 delete_customprofilefield -132 Can view custom profile field 33 view_customprofilefield -133 Can add custom profile field value 34 add_customprofilefieldvalue -134 Can change custom profile field value 34 change_customprofilefieldvalue -135 Can delete custom profile field value 34 delete_customprofilefieldvalue -136 Can view custom profile field value 34 view_customprofilefieldvalue -137 Can add service 35 add_service -138 Can change service 35 change_service -139 Can delete service 35 delete_service -140 Can view service 35 view_service -141 Can add scheduled email 36 add_scheduledemail -142 Can change scheduled email 36 change_scheduledemail -143 Can delete scheduled email 36 delete_scheduledemail -144 Can view scheduled email 36 view_scheduledemail -145 Can add multiuse invite 37 add_multiuseinvite -146 Can change multiuse invite 37 change_multiuseinvite -147 Can delete multiuse invite 37 delete_multiuseinvite -148 Can view multiuse invite 37 view_multiuseinvite -149 Can add default stream group 38 add_defaultstreamgroup -150 Can change default stream group 38 change_defaultstreamgroup -151 Can delete default stream group 38 delete_defaultstreamgroup -152 Can view default stream group 38 view_defaultstreamgroup -153 Can add user group 39 add_usergroup -154 Can change user group 39 change_usergroup -155 Can delete user group 39 delete_usergroup -156 Can view user group 39 view_usergroup -157 Can add user group membership 40 add_usergroupmembership -158 Can change user group membership 40 change_usergroupmembership -159 Can delete user group membership 40 delete_usergroupmembership -160 Can view user group membership 40 view_usergroupmembership -161 Can add bot storage data 41 add_botstoragedata -162 Can change bot storage data 41 change_botstoragedata -163 Can delete bot storage data 41 delete_botstoragedata -164 Can view bot storage data 41 view_botstoragedata -165 Can add bot config data 42 add_botconfigdata -166 Can change bot config data 42 change_botconfigdata -167 Can delete bot config data 42 delete_botconfigdata -168 Can view bot config data 42 view_botconfigdata -169 Can add scheduled message 43 add_scheduledmessage -170 Can change scheduled message 43 change_scheduledmessage -171 Can delete scheduled message 43 delete_scheduledmessage -172 Can view scheduled message 43 view_scheduledmessage -173 Can add sub message 44 add_submessage -174 Can change sub message 44 change_submessage -175 Can delete sub message 44 delete_submessage -176 Can view sub message 44 view_submessage -177 Can add user status 45 add_userstatus -178 Can change user status 45 change_userstatus -179 Can delete user status 45 delete_userstatus -180 Can view user status 45 view_userstatus -181 Can add archived reaction 46 add_archivedreaction -182 Can change archived reaction 46 change_archivedreaction -183 Can delete archived reaction 46 delete_archivedreaction -184 Can view archived reaction 46 view_archivedreaction -185 Can add archived sub message 47 add_archivedsubmessage -186 Can change archived sub message 47 change_archivedsubmessage -187 Can delete archived sub message 47 delete_archivedsubmessage -188 Can view archived sub message 47 view_archivedsubmessage -189 Can add archive transaction 48 add_archivetransaction -190 Can change archive transaction 48 change_archivetransaction -191 Can delete archive transaction 48 delete_archivetransaction -192 Can view archive transaction 48 view_archivetransaction -193 Can add missed message email address 49 add_missedmessageemailaddress -194 Can change missed message email address 49 change_missedmessageemailaddress -195 Can delete missed message email address 49 delete_missedmessageemailaddress -196 Can view missed message email address 49 view_missedmessageemailaddress -197 Can add alert word 50 add_alertword -198 Can change alert word 50 change_alertword -199 Can delete alert word 50 delete_alertword -200 Can view alert word 50 view_alertword -201 Can add draft 51 add_draft -202 Can change draft 51 change_draft -203 Can delete draft 51 delete_draft -204 Can view draft 51 view_draft -205 Can add muted user 52 add_muteduser -206 Can change muted user 52 change_muteduser -207 Can delete muted user 52 delete_muteduser -208 Can view muted user 52 view_muteduser -209 Can add realm playground 53 add_realmplayground -210 Can change realm playground 53 change_realmplayground -211 Can delete realm playground 53 delete_realmplayground -212 Can view realm playground 53 view_realmplayground -213 Can add scheduled message notification email 54 add_scheduledmessagenotificationemail -214 Can change scheduled message notification email 54 change_scheduledmessagenotificationemail -215 Can delete scheduled message notification email 54 delete_scheduledmessagenotificationemail -216 Can view scheduled message notification email 54 view_scheduledmessagenotificationemail -217 Can add realm user default 55 add_realmuserdefault -218 Can change realm user default 55 change_realmuserdefault -219 Can delete realm user default 55 delete_realmuserdefault -220 Can view realm user default 55 view_realmuserdefault -221 Can add user topic 56 add_usertopic -222 Can change user topic 56 change_usertopic -223 Can delete user topic 56 delete_usertopic -224 Can view user topic 56 view_usertopic -225 Can add group group membership 57 add_groupgroupmembership -226 Can change group group membership 57 change_groupgroupmembership -227 Can delete group group membership 57 delete_groupgroupmembership -228 Can view group group membership 57 view_groupgroupmembership -229 Can add scim client 58 add_scimclient -230 Can change scim client 58 change_scimclient -231 Can delete scim client 58 delete_scimclient -232 Can view scim client 58 view_scimclient -233 Can add association 59 add_association -234 Can change association 59 change_association -235 Can delete association 59 delete_association -236 Can view association 59 view_association -237 Can add code 60 add_code -238 Can change code 60 change_code -239 Can delete code 60 delete_code -240 Can view code 60 view_code -241 Can add nonce 61 add_nonce -242 Can change nonce 61 change_nonce -243 Can delete nonce 61 delete_nonce -244 Can view nonce 61 view_nonce -245 Can add user social auth 62 add_usersocialauth -246 Can change user social auth 62 change_usersocialauth -247 Can delete user social auth 62 delete_usersocialauth -248 Can view user social auth 62 view_usersocialauth -249 Can add partial 63 add_partial -250 Can change partial 63 change_partial -251 Can delete partial 63 delete_partial -252 Can view partial 63 view_partial -253 Can add static device 64 add_staticdevice -254 Can change static device 64 change_staticdevice -255 Can delete static device 64 delete_staticdevice -256 Can view static device 64 view_staticdevice -257 Can add static token 65 add_statictoken -258 Can change static token 65 change_statictoken -259 Can delete static token 65 delete_statictoken -260 Can view static token 65 view_statictoken -261 Can add TOTP device 66 add_totpdevice -262 Can change TOTP device 66 change_totpdevice -263 Can delete TOTP device 66 delete_totpdevice -264 Can view TOTP device 66 view_totpdevice -265 Can add phone device 67 add_phonedevice -266 Can change phone device 67 change_phonedevice -267 Can delete phone device 67 delete_phonedevice -268 Can view phone device 67 view_phonedevice -269 Can add installation count 68 add_installationcount -270 Can change installation count 68 change_installationcount -271 Can delete installation count 68 delete_installationcount -272 Can view installation count 68 view_installationcount -273 Can add realm count 69 add_realmcount -274 Can change realm count 69 change_realmcount -275 Can delete realm count 69 delete_realmcount -276 Can view realm count 69 view_realmcount -277 Can add stream count 70 add_streamcount -278 Can change stream count 70 change_streamcount -279 Can delete stream count 70 delete_streamcount -280 Can view stream count 70 view_streamcount -281 Can add user count 71 add_usercount -282 Can change user count 71 change_usercount -283 Can delete user count 71 delete_usercount -284 Can view user count 71 view_usercount -285 Can add fill state 72 add_fillstate -286 Can change fill state 72 change_fillstate -287 Can delete fill state 72 delete_fillstate -288 Can view fill state 72 view_fillstate -289 Can add realm reactivation status 73 add_realmreactivationstatus -290 Can change realm reactivation status 73 change_realmreactivationstatus -291 Can delete realm reactivation status 73 delete_realmreactivationstatus -292 Can view realm reactivation status 73 view_realmreactivationstatus -293 Can add preregistration realm 74 add_preregistrationrealm -294 Can change preregistration realm 74 change_preregistrationrealm -295 Can delete preregistration realm 74 delete_preregistrationrealm -296 Can view preregistration realm 74 view_preregistrationrealm -297 Can add realm authentication method 75 add_realmauthenticationmethod -298 Can change realm authentication method 75 change_realmauthenticationmethod -299 Can delete realm authentication method 75 delete_realmauthenticationmethod -300 Can view realm authentication method 75 view_realmauthenticationmethod -301 Can add phone device 76 add_phonedevice -302 Can change phone device 76 change_phonedevice -303 Can delete phone device 76 delete_phonedevice -304 Can view phone device 76 view_phonedevice -305 Can add onboarding step 77 add_onboardingstep -306 Can change onboarding step 77 change_onboardingstep -307 Can delete onboarding step 77 delete_onboardingstep -308 Can view onboarding step 77 view_onboardingstep +37 Can add message 10 add_message +38 Can change message 10 change_message +39 Can delete message 10 delete_message +40 Can view message 10 view_message +41 Can add preregistration user 11 add_preregistrationuser +42 Can change preregistration user 11 change_preregistrationuser +43 Can delete preregistration user 11 delete_preregistrationuser +44 Can view preregistration user 11 view_preregistrationuser +45 Can add push device token 12 add_pushdevicetoken +46 Can change push device token 12 change_pushdevicetoken +47 Can delete push device token 12 delete_pushdevicetoken +48 Can view push device token 12 view_pushdevicetoken +49 Can add realm 13 add_realm +50 Can change realm 13 change_realm +51 Can delete realm 13 delete_realm +52 Can view realm 13 view_realm +53 Can add realm emoji 14 add_realmemoji +54 Can change realm emoji 14 change_realmemoji +55 Can delete realm emoji 14 delete_realmemoji +56 Can view realm emoji 14 view_realmemoji +57 Can add realm filter 15 add_realmfilter +58 Can change realm filter 15 change_realmfilter +59 Can delete realm filter 15 delete_realmfilter +60 Can view realm filter 15 view_realmfilter +61 Can add recipient 16 add_recipient +62 Can change recipient 16 change_recipient +63 Can delete recipient 16 delete_recipient +64 Can view recipient 16 view_recipient +65 Can add stream 17 add_stream +66 Can change stream 17 change_stream +67 Can delete stream 17 delete_stream +68 Can view stream 17 view_stream +69 Can add subscription 18 add_subscription +70 Can change subscription 18 change_subscription +71 Can delete subscription 18 delete_subscription +72 Can view subscription 18 view_subscription +73 Can add user activity 19 add_useractivity +74 Can change user activity 19 change_useractivity +75 Can delete user activity 19 delete_useractivity +76 Can view user activity 19 view_useractivity +77 Can add user activity interval 20 add_useractivityinterval +78 Can change user activity interval 20 change_useractivityinterval +79 Can delete user activity interval 20 delete_useractivityinterval +80 Can view user activity interval 20 view_useractivityinterval +81 Can add user message 21 add_usermessage +82 Can change user message 21 change_usermessage +83 Can delete user message 21 delete_usermessage +84 Can view user message 21 view_usermessage +85 Can add attachment 22 add_attachment +86 Can change attachment 22 change_attachment +87 Can delete attachment 22 delete_attachment +88 Can view attachment 22 view_attachment +89 Can add reaction 23 add_reaction +90 Can change reaction 23 change_reaction +91 Can delete reaction 23 delete_reaction +92 Can view reaction 23 view_reaction +93 Can add email change status 24 add_emailchangestatus +94 Can change email change status 24 change_emailchangestatus +95 Can delete email change status 24 delete_emailchangestatus +96 Can view email change status 24 view_emailchangestatus +97 Can add realm audit log 25 add_realmauditlog +98 Can change realm audit log 25 change_realmauditlog +189 Can add draft 48 add_draft +99 Can delete realm audit log 25 delete_realmauditlog +100 Can view realm audit log 25 view_realmauditlog +101 Can add archived attachment 26 add_archivedattachment +102 Can change archived attachment 26 change_archivedattachment +103 Can delete archived attachment 26 delete_archivedattachment +104 Can view archived attachment 26 view_archivedattachment +105 Can add archived message 27 add_archivedmessage +106 Can change archived message 27 change_archivedmessage +107 Can delete archived message 27 delete_archivedmessage +108 Can view archived message 27 view_archivedmessage +109 Can add archived user message 28 add_archivedusermessage +110 Can change archived user message 28 change_archivedusermessage +111 Can delete archived user message 28 delete_archivedusermessage +112 Can view archived user message 28 view_archivedusermessage +113 Can add realm domain 29 add_realmdomain +114 Can change realm domain 29 change_realmdomain +115 Can delete realm domain 29 delete_realmdomain +116 Can view realm domain 29 view_realmdomain +117 Can add custom profile field 30 add_customprofilefield +118 Can change custom profile field 30 change_customprofilefield +119 Can delete custom profile field 30 delete_customprofilefield +120 Can view custom profile field 30 view_customprofilefield +121 Can add custom profile field value 31 add_customprofilefieldvalue +122 Can change custom profile field value 31 change_customprofilefieldvalue +123 Can delete custom profile field value 31 delete_customprofilefieldvalue +124 Can view custom profile field value 31 view_customprofilefieldvalue +125 Can add service 32 add_service +126 Can change service 32 change_service +127 Can delete service 32 delete_service +128 Can view service 32 view_service +129 Can add scheduled email 33 add_scheduledemail +130 Can change scheduled email 33 change_scheduledemail +131 Can delete scheduled email 33 delete_scheduledemail +132 Can view scheduled email 33 view_scheduledemail +133 Can add multiuse invite 34 add_multiuseinvite +134 Can change multiuse invite 34 change_multiuseinvite +135 Can delete multiuse invite 34 delete_multiuseinvite +136 Can view multiuse invite 34 view_multiuseinvite +137 Can add default stream group 35 add_defaultstreamgroup +138 Can change default stream group 35 change_defaultstreamgroup +139 Can delete default stream group 35 delete_defaultstreamgroup +140 Can view default stream group 35 view_defaultstreamgroup +141 Can add user group 36 add_usergroup +142 Can change user group 36 change_usergroup +143 Can delete user group 36 delete_usergroup +144 Can view user group 36 view_usergroup +145 Can add user group membership 37 add_usergroupmembership +146 Can change user group membership 37 change_usergroupmembership +147 Can delete user group membership 37 delete_usergroupmembership +148 Can view user group membership 37 view_usergroupmembership +149 Can add bot storage data 38 add_botstoragedata +150 Can change bot storage data 38 change_botstoragedata +151 Can delete bot storage data 38 delete_botstoragedata +152 Can view bot storage data 38 view_botstoragedata +153 Can add bot config data 39 add_botconfigdata +154 Can change bot config data 39 change_botconfigdata +155 Can delete bot config data 39 delete_botconfigdata +156 Can view bot config data 39 view_botconfigdata +157 Can add scheduled message 40 add_scheduledmessage +158 Can change scheduled message 40 change_scheduledmessage +159 Can delete scheduled message 40 delete_scheduledmessage +160 Can view scheduled message 40 view_scheduledmessage +161 Can add sub message 41 add_submessage +162 Can change sub message 41 change_submessage +163 Can delete sub message 41 delete_submessage +164 Can view sub message 41 view_submessage +165 Can add user status 42 add_userstatus +166 Can change user status 42 change_userstatus +167 Can delete user status 42 delete_userstatus +168 Can view user status 42 view_userstatus +169 Can add archived reaction 43 add_archivedreaction +170 Can change archived reaction 43 change_archivedreaction +171 Can delete archived reaction 43 delete_archivedreaction +172 Can view archived reaction 43 view_archivedreaction +173 Can add archived sub message 44 add_archivedsubmessage +174 Can change archived sub message 44 change_archivedsubmessage +175 Can delete archived sub message 44 delete_archivedsubmessage +176 Can view archived sub message 44 view_archivedsubmessage +177 Can add archive transaction 45 add_archivetransaction +178 Can change archive transaction 45 change_archivetransaction +179 Can delete archive transaction 45 delete_archivetransaction +180 Can view archive transaction 45 view_archivetransaction +181 Can add missed message email address 46 add_missedmessageemailaddress +182 Can change missed message email address 46 change_missedmessageemailaddress +183 Can delete missed message email address 46 delete_missedmessageemailaddress +184 Can view missed message email address 46 view_missedmessageemailaddress +185 Can add alert word 47 add_alertword +186 Can change alert word 47 change_alertword +187 Can delete alert word 47 delete_alertword +188 Can view alert word 47 view_alertword +190 Can change draft 48 change_draft +191 Can delete draft 48 delete_draft +192 Can view draft 48 view_draft +193 Can add muted user 49 add_muteduser +194 Can change muted user 49 change_muteduser +195 Can delete muted user 49 delete_muteduser +196 Can view muted user 49 view_muteduser +197 Can add realm playground 50 add_realmplayground +198 Can change realm playground 50 change_realmplayground +199 Can delete realm playground 50 delete_realmplayground +200 Can view realm playground 50 view_realmplayground +201 Can add scheduled message notification email 51 add_scheduledmessagenotificationemail +202 Can change scheduled message notification email 51 change_scheduledmessagenotificationemail +203 Can delete scheduled message notification email 51 delete_scheduledmessagenotificationemail +204 Can view scheduled message notification email 51 view_scheduledmessagenotificationemail +205 Can add realm user default 52 add_realmuserdefault +206 Can change realm user default 52 change_realmuserdefault +207 Can delete realm user default 52 delete_realmuserdefault +208 Can view realm user default 52 view_realmuserdefault +209 Can add user topic 53 add_usertopic +210 Can change user topic 53 change_usertopic +211 Can delete user topic 53 delete_usertopic +212 Can view user topic 53 view_usertopic +213 Can add group group membership 54 add_groupgroupmembership +214 Can change group group membership 54 change_groupgroupmembership +215 Can delete group group membership 54 delete_groupgroupmembership +216 Can view group group membership 54 view_groupgroupmembership +217 Can add realm reactivation status 55 add_realmreactivationstatus +218 Can change realm reactivation status 55 change_realmreactivationstatus +219 Can delete realm reactivation status 55 delete_realmreactivationstatus +220 Can view realm reactivation status 55 view_realmreactivationstatus +221 Can add preregistration realm 56 add_preregistrationrealm +222 Can change preregistration realm 56 change_preregistrationrealm +223 Can delete preregistration realm 56 delete_preregistrationrealm +224 Can view preregistration realm 56 view_preregistrationrealm +225 Can add realm authentication method 57 add_realmauthenticationmethod +226 Can change realm authentication method 57 change_realmauthenticationmethod +227 Can delete realm authentication method 57 delete_realmauthenticationmethod +228 Can view realm authentication method 57 view_realmauthenticationmethod +229 Can add user presence 58 add_userpresence +230 Can change user presence 58 change_userpresence +231 Can delete user presence 58 delete_userpresence +232 Can view user presence 58 view_userpresence +233 Can add onboarding step 59 add_onboardingstep +234 Can change onboarding step 59 change_onboardingstep +235 Can delete onboarding step 59 delete_onboardingstep +236 Can view onboarding step 59 view_onboardingstep +237 Can add named user group 60 add_namedusergroup +238 Can change named user group 60 change_namedusergroup +239 Can delete named user group 60 delete_namedusergroup +240 Can view named user group 60 view_namedusergroup +241 Can add presence sequence 61 add_presencesequence +242 Can change presence sequence 61 change_presencesequence +243 Can delete presence sequence 61 delete_presencesequence +244 Can view presence sequence 61 view_presencesequence +245 Can add onboarding user message 62 add_onboardingusermessage +246 Can change onboarding user message 62 change_onboardingusermessage +247 Can delete onboarding user message 62 delete_onboardingusermessage +248 Can view onboarding user message 62 view_onboardingusermessage +249 Can add direct message group 63 add_directmessagegroup +250 Can change direct message group 63 change_directmessagegroup +251 Can delete direct message group 63 delete_directmessagegroup +252 Can view direct message group 63 view_directmessagegroup +253 Can add image attachment 64 add_imageattachment +254 Can change image attachment 64 change_imageattachment +255 Can delete image attachment 64 delete_imageattachment +256 Can view image attachment 64 view_imageattachment +257 Can add association 65 add_association +258 Can change association 65 change_association +259 Can delete association 65 delete_association +260 Can view association 65 view_association +261 Can add code 66 add_code +262 Can change code 66 change_code +263 Can delete code 66 delete_code +264 Can view code 66 view_code +265 Can add nonce 67 add_nonce +266 Can change nonce 67 change_nonce +267 Can delete nonce 67 delete_nonce +268 Can view nonce 67 view_nonce +269 Can add user social auth 68 add_usersocialauth +270 Can change user social auth 68 change_usersocialauth +271 Can delete user social auth 68 delete_usersocialauth +272 Can view user social auth 68 view_usersocialauth +273 Can add partial 69 add_partial +274 Can change partial 69 change_partial +275 Can delete partial 69 delete_partial +276 Can view partial 69 view_partial +277 Can add static device 70 add_staticdevice +278 Can change static device 70 change_staticdevice +279 Can delete static device 70 delete_staticdevice +280 Can view static device 70 view_staticdevice +281 Can add static token 71 add_statictoken +282 Can change static token 71 change_statictoken +283 Can delete static token 71 delete_statictoken +284 Can view static token 71 view_statictoken +285 Can add TOTP device 72 add_totpdevice +286 Can change TOTP device 72 change_totpdevice +287 Can delete TOTP device 72 delete_totpdevice +288 Can view TOTP device 72 view_totpdevice +289 Can add phone device 73 add_phonedevice +290 Can change phone device 73 change_phonedevice +291 Can delete phone device 73 delete_phonedevice +292 Can view phone device 73 view_phonedevice +293 Can add installation count 74 add_installationcount +294 Can change installation count 74 change_installationcount +295 Can delete installation count 74 delete_installationcount +296 Can view installation count 74 view_installationcount +297 Can add realm count 75 add_realmcount +298 Can change realm count 75 change_realmcount +299 Can delete realm count 75 delete_realmcount +300 Can view realm count 75 view_realmcount +301 Can add stream count 76 add_streamcount +302 Can change stream count 76 change_streamcount +303 Can delete stream count 76 delete_streamcount +304 Can view stream count 76 view_streamcount +305 Can add user count 77 add_usercount +306 Can change user count 77 change_usercount +307 Can delete user count 77 delete_usercount +308 Can view user count 77 view_usercount +309 Can add fill state 78 add_fillstate +310 Can change fill state 78 change_fillstate +311 Can delete fill state 78 delete_fillstate +312 Can view fill state 78 view_fillstate \. @@ -4541,8 +3513,8 @@ COPY zulip.auth_permission (id, name, content_type_id, codename) FROM stdin; -- COPY zulip.confirmation_confirmation (id, object_id, date_sent, confirmation_key, content_type_id, type, realm_id, expiry_date) FROM stdin; -1 1 2022-04-23 08:50:40.197722+00 lyzxxh4m7jh64dzod7vpi4dh 12 7 \N 2022-04-24 08:50:40.197722+00 -2 8 2022-04-23 08:50:55.265124+00 5rzmtckx3ggc52j6e5c5o232 7 4 2 4760-03-20 08:50:55.265124+00 +1 1 2024-08-02 09:00:06.032514+00 lzjvjbw63765pkgmorqh4bbl 56 7 \N 2024-08-03 09:00:06.032514+00 +2 8 2024-08-02 09:00:27.062221+00 aasgnk3uxlzdurlf4mbgdc22 7 4 2 4762-06-30 09:00:27.062221+00 \. @@ -4568,74 +3540,75 @@ COPY zulip.django_content_type (id, app_label, model) FROM stdin; 7 zerver userprofile 8 zerver client 9 zerver defaultstream -10 zerver huddle -11 zerver message -12 zerver preregistrationuser -13 zerver pushdevicetoken -14 zerver realm -15 zerver realmemoji -16 zerver realmfilter -17 zerver recipient -18 zerver stream -19 zerver subscription -20 zerver useractivity -21 zerver useractivityinterval -22 zerver usermessage -23 zerver userpresence -24 zerver attachment -25 zerver reaction -26 zerver emailchangestatus -27 zerver realmauditlog -28 zerver archivedattachment -29 zerver archivedmessage -30 zerver archivedusermessage -31 zerver userhotspot -32 zerver realmdomain -33 zerver customprofilefield -34 zerver customprofilefieldvalue -35 zerver service -36 zerver scheduledemail -37 zerver multiuseinvite -38 zerver defaultstreamgroup -39 zerver usergroup -40 zerver usergroupmembership -41 zerver botstoragedata -42 zerver botconfigdata -43 zerver scheduledmessage -44 zerver submessage -45 zerver userstatus -46 zerver archivedreaction -47 zerver archivedsubmessage -48 zerver archivetransaction -49 zerver missedmessageemailaddress -50 zerver alertword -51 zerver draft -52 zerver muteduser -53 zerver realmplayground -54 zerver scheduledmessagenotificationemail -55 zerver realmuserdefault -56 zerver usertopic -57 zerver groupgroupmembership -58 zerver scimclient -59 social_django association -60 social_django code -61 social_django nonce -62 social_django usersocialauth -63 social_django partial -64 otp_static staticdevice -65 otp_static statictoken -66 otp_totp totpdevice -67 two_factor phonedevice -68 analytics installationcount -69 analytics realmcount -70 analytics streamcount -71 analytics usercount -72 analytics fillstate -73 zerver realmreactivationstatus -74 zerver preregistrationrealm -75 zerver realmauthenticationmethod -76 phonenumber phonedevice -77 zerver onboardingstep +10 zerver message +11 zerver preregistrationuser +12 zerver pushdevicetoken +13 zerver realm +14 zerver realmemoji +15 zerver realmfilter +16 zerver recipient +17 zerver stream +18 zerver subscription +19 zerver useractivity +20 zerver useractivityinterval +21 zerver usermessage +22 zerver attachment +23 zerver reaction +24 zerver emailchangestatus +25 zerver realmauditlog +26 zerver archivedattachment +27 zerver archivedmessage +28 zerver archivedusermessage +29 zerver realmdomain +30 zerver customprofilefield +31 zerver customprofilefieldvalue +32 zerver service +33 zerver scheduledemail +34 zerver multiuseinvite +35 zerver defaultstreamgroup +36 zerver usergroup +37 zerver usergroupmembership +38 zerver botstoragedata +39 zerver botconfigdata +40 zerver scheduledmessage +41 zerver submessage +42 zerver userstatus +43 zerver archivedreaction +44 zerver archivedsubmessage +45 zerver archivetransaction +46 zerver missedmessageemailaddress +47 zerver alertword +48 zerver draft +49 zerver muteduser +50 zerver realmplayground +51 zerver scheduledmessagenotificationemail +52 zerver realmuserdefault +53 zerver usertopic +54 zerver groupgroupmembership +55 zerver realmreactivationstatus +56 zerver preregistrationrealm +57 zerver realmauthenticationmethod +58 zerver userpresence +59 zerver onboardingstep +60 zerver namedusergroup +61 zerver presencesequence +62 zerver onboardingusermessage +63 zerver directmessagegroup +64 zerver imageattachment +65 social_django association +66 social_django code +67 social_django nonce +68 social_django usersocialauth +69 social_django partial +70 otp_static staticdevice +71 otp_static statictoken +72 otp_totp totpdevice +73 phonenumber phonedevice +74 analytics installationcount +75 analytics realmcount +76 analytics streamcount +77 analytics usercount +78 analytics fillstate \. @@ -4644,558 +3617,630 @@ COPY zulip.django_content_type (id, app_label, model) FROM stdin; -- COPY zulip.django_migrations (id, app, name, applied) FROM stdin; -1 contenttypes 0001_initial 2022-04-23 08:49:05.875385+00 -2 auth 0001_initial 2022-04-23 08:49:05.964763+00 -3 zerver 0001_initial 2022-04-23 08:49:07.660394+00 -4 zerver 0029_realm_subdomain 2022-04-23 08:49:07.711932+00 -5 zerver 0030_realm_org_type 2022-04-23 08:49:07.751215+00 -6 zerver 0031_remove_system_avatar_source 2022-04-23 08:49:07.801125+00 -7 zerver 0032_verify_all_medium_avatar_images 2022-04-23 08:49:07.836548+00 -8 zerver 0033_migrate_domain_to_realmalias 2022-04-23 08:49:07.889044+00 -9 zerver 0034_userprofile_enable_online_push_notifications 2022-04-23 08:49:08.008293+00 -10 zerver 0035_realm_message_retention_period_days 2022-04-23 08:49:08.055983+00 -11 zerver 0036_rename_subdomain_to_string_id 2022-04-23 08:49:08.109711+00 -12 zerver 0037_disallow_null_string_id 2022-04-23 08:49:08.20461+00 -13 zerver 0038_realm_change_to_community_defaults 2022-04-23 08:49:08.289382+00 -14 zerver 0039_realmalias_drop_uniqueness 2022-04-23 08:49:08.340489+00 -15 zerver 0040_realm_authentication_methods 2022-04-23 08:49:08.400731+00 -16 zerver 0041_create_attachments_for_old_messages 2022-04-23 08:49:08.496266+00 -17 zerver 0042_attachment_file_name_length 2022-04-23 08:49:08.542861+00 -18 zerver 0043_realm_filter_validators 2022-04-23 08:49:09.203142+00 -19 zerver 0044_reaction 2022-04-23 08:49:09.308432+00 -20 zerver 0045_realm_waiting_period_threshold 2022-04-23 08:49:09.351883+00 -21 zerver 0046_realmemoji_author 2022-04-23 08:49:09.409408+00 -22 zerver 0047_realm_add_emoji_by_admins_only 2022-04-23 08:49:09.469574+00 -23 zerver 0048_enter_sends_default_to_false 2022-04-23 08:49:09.521878+00 -24 zerver 0049_userprofile_pm_content_in_desktop_notifications 2022-04-23 08:49:09.643586+00 -25 zerver 0050_userprofile_avatar_version 2022-04-23 08:49:09.744018+00 -26 analytics 0001_initial 2022-04-23 08:49:10.232292+00 -27 analytics 0002_remove_huddlecount 2022-04-23 08:49:10.361795+00 -28 analytics 0003_fillstate 2022-04-23 08:49:10.382309+00 -29 analytics 0004_add_subgroup 2022-04-23 08:49:10.591541+00 -30 analytics 0005_alter_field_size 2022-04-23 08:49:10.853519+00 -31 analytics 0006_add_subgroup_to_unique_constraints 2022-04-23 08:49:10.962437+00 -32 analytics 0007_remove_interval 2022-04-23 08:49:11.1048+00 -33 analytics 0008_add_count_indexes 2022-04-23 08:49:11.178832+00 -34 analytics 0009_remove_messages_to_stream_stat 2022-04-23 08:49:11.221615+00 -35 analytics 0010_clear_messages_sent_values 2022-04-23 08:49:11.261406+00 -36 analytics 0011_clear_analytics_tables 2022-04-23 08:49:11.413395+00 -37 analytics 0012_add_on_delete 2022-04-23 08:49:11.526933+00 -38 analytics 0013_remove_anomaly 2022-04-23 08:49:11.642528+00 -39 analytics 0014_remove_fillstate_last_modified 2022-04-23 08:49:11.648734+00 -40 analytics 0015_clear_duplicate_counts 2022-04-23 08:49:11.688268+00 -41 analytics 0016_unique_constraint_when_subgroup_null 2022-04-23 08:49:11.944176+00 -42 contenttypes 0002_remove_content_type_name 2022-04-23 08:49:12.014792+00 -43 auth 0002_alter_permission_name_max_length 2022-04-23 08:49:12.068711+00 -44 auth 0003_alter_user_email_max_length 2022-04-23 08:49:12.092364+00 -45 auth 0004_alter_user_username_opts 2022-04-23 08:49:12.122844+00 -46 auth 0005_alter_user_last_login_null 2022-04-23 08:49:12.155937+00 -47 auth 0006_require_contenttypes_0002 2022-04-23 08:49:12.161503+00 -48 auth 0007_alter_validators_add_error_messages 2022-04-23 08:49:12.195422+00 -49 auth 0008_alter_user_username_max_length 2022-04-23 08:49:12.223434+00 -50 auth 0009_alter_user_last_name_max_length 2022-04-23 08:49:12.247289+00 -51 auth 0010_alter_group_name_max_length 2022-04-23 08:49:12.307742+00 -52 auth 0011_update_proxy_permissions 2022-04-23 08:49:12.807748+00 -53 auth 0012_alter_user_first_name_max_length 2022-04-23 08:49:12.821265+00 -54 zerver 0051_realmalias_add_allow_subdomains 2022-04-23 08:49:12.897907+00 -55 zerver 0052_auto_fix_realmalias_realm_nullable 2022-04-23 08:49:12.95736+00 -56 zerver 0053_emailchangestatus 2022-04-23 08:49:13.035347+00 -57 zerver 0054_realm_icon 2022-04-23 08:49:13.153454+00 -58 zerver 0055_attachment_size 2022-04-23 08:49:13.213572+00 -59 zerver 0056_userprofile_emoji_alt_code 2022-04-23 08:49:13.332286+00 -60 zerver 0057_realmauditlog 2022-04-23 08:49:13.501242+00 -61 zerver 0058_realm_email_changes_disabled 2022-04-23 08:49:13.565295+00 -62 zerver 0059_userprofile_quota 2022-04-23 08:49:13.651258+00 -63 zerver 0060_move_avatars_to_be_uid_based 2022-04-23 08:49:13.655572+00 -64 zerver 0061_userprofile_timezone 2022-04-23 08:49:13.733766+00 -65 zerver 0062_default_timezone 2022-04-23 08:49:13.797844+00 -66 zerver 0063_realm_description 2022-04-23 08:49:13.847491+00 -67 zerver 0064_sync_uploads_filesize_with_db 2022-04-23 08:49:13.853315+00 -68 zerver 0065_realm_inline_image_preview 2022-04-23 08:49:13.927255+00 -69 zerver 0066_realm_inline_url_embed_preview 2022-04-23 08:49:14.012396+00 -70 zerver 0067_archived_models 2022-04-23 08:49:15.161201+00 -71 zerver 0068_remove_realm_domain 2022-04-23 08:49:15.197286+00 -72 zerver 0069_realmauditlog_extra_data 2022-04-23 08:49:15.260612+00 -73 zerver 0070_userhotspot 2022-04-23 08:49:15.390937+00 -74 zerver 0071_rename_realmalias_to_realmdomain 2022-04-23 08:49:15.498341+00 -75 zerver 0072_realmauditlog_add_index_event_time 2022-04-23 08:49:15.601502+00 -76 zerver 0073_custom_profile_fields 2022-04-23 08:49:15.905825+00 -77 zerver 0074_fix_duplicate_attachments 2022-04-23 08:49:15.991703+00 -78 zerver 0075_attachment_path_id_unique 2022-04-23 08:49:16.173592+00 -79 zerver 0076_userprofile_emojiset 2022-04-23 08:49:16.443494+00 -80 zerver 0077_add_file_name_field_to_realm_emoji 2022-04-23 08:49:16.587514+00 -81 zerver 0078_service 2022-04-23 08:49:16.667519+00 -82 zerver 0079_remove_old_scheduled_jobs 2022-04-23 08:49:16.713669+00 -83 zerver 0080_realm_description_length 2022-04-23 08:49:16.742047+00 -84 zerver 0081_make_emoji_lowercase 2022-04-23 08:49:16.849985+00 -85 zerver 0082_index_starred_user_messages 2022-04-23 08:49:16.924284+00 -86 zerver 0083_index_mentioned_user_messages 2022-04-23 08:49:16.9876+00 -87 zerver 0084_realmemoji_deactivated 2022-04-23 08:49:17.074565+00 -88 zerver 0085_fix_bots_with_none_bot_type 2022-04-23 08:49:17.127326+00 -89 zerver 0086_realm_alter_default_org_type 2022-04-23 08:49:17.15616+00 -90 zerver 0087_remove_old_scheduled_jobs 2022-04-23 08:49:17.215496+00 -91 zerver 0088_remove_referral_and_invites 2022-04-23 08:49:17.866631+00 -92 zerver 0089_auto_20170710_1353 2022-04-23 08:49:17.981993+00 -93 zerver 0090_userprofile_high_contrast_mode 2022-04-23 08:49:18.064155+00 -94 zerver 0091_realm_allow_edit_history 2022-04-23 08:49:18.158395+00 -95 zerver 0092_create_scheduledemail 2022-04-23 08:49:18.270516+00 -96 zerver 0093_subscription_event_log_backfill 2022-04-23 08:49:18.384957+00 -97 zerver 0094_realm_filter_url_validator 2022-04-23 08:49:18.414373+00 -98 zerver 0095_index_unread_user_messages 2022-04-23 08:49:18.468665+00 -99 zerver 0096_add_password_required 2022-04-23 08:49:18.522819+00 -100 zerver 0097_reactions_emoji_code 2022-04-23 08:49:18.736127+00 -101 zerver 0098_index_has_alert_word_user_messages 2022-04-23 08:49:18.815434+00 -102 zerver 0099_index_wildcard_mentioned_user_messages 2022-04-23 08:49:18.883351+00 -103 zerver 0100_usermessage_remove_is_me_message 2022-04-23 08:49:19.222074+00 -104 zerver 0101_muted_topic 2022-04-23 08:49:19.411497+00 -105 zerver 0102_convert_muted_topic 2022-04-23 08:49:19.50301+00 -106 zerver 0103_remove_userprofile_muted_topics 2022-04-23 08:49:19.586407+00 -107 zerver 0104_fix_unreads 2022-04-23 08:49:19.6595+00 -108 zerver 0105_userprofile_enable_stream_push_notifications 2022-04-23 08:49:19.770912+00 -109 zerver 0106_subscription_push_notifications 2022-04-23 08:49:19.856765+00 -110 zerver 0107_multiuseinvite 2022-04-23 08:49:20.01832+00 -111 zerver 0108_fix_default_string_id 2022-04-23 08:49:20.09868+00 -112 zerver 0109_mark_tutorial_status_finished 2022-04-23 08:49:20.189124+00 -113 zerver 0110_stream_is_in_zephyr_realm 2022-04-23 08:49:20.369579+00 -114 zerver 0111_botuserstatedata 2022-04-23 08:49:20.56416+00 -115 zerver 0112_index_muted_topics 2022-04-23 08:49:21.222342+00 -116 zerver 0113_default_stream_group 2022-04-23 08:49:21.322562+00 -117 zerver 0114_preregistrationuser_invited_as_admin 2022-04-23 08:49:21.376417+00 -118 zerver 0115_user_groups 2022-04-23 08:49:21.576443+00 -119 zerver 0116_realm_allow_message_deleting 2022-04-23 08:49:21.622315+00 -120 zerver 0117_add_desc_to_user_group 2022-04-23 08:49:21.67961+00 -121 zerver 0118_defaultstreamgroup_description 2022-04-23 08:49:21.725442+00 -122 zerver 0119_userprofile_night_mode 2022-04-23 08:49:21.836316+00 -123 zerver 0120_botuserconfigdata 2022-04-23 08:49:22.644638+00 -124 zerver 0121_realm_signup_notifications_stream 2022-04-23 08:49:22.770799+00 -125 zerver 0122_rename_botuserstatedata_botstoragedata 2022-04-23 08:49:22.852298+00 -126 zerver 0123_userprofile_make_realm_email_pair_unique 2022-04-23 08:49:22.996397+00 -127 zerver 0124_stream_enable_notifications 2022-04-23 08:49:23.212148+00 -128 confirmation 0001_initial 2022-04-23 08:49:23.323412+00 -129 confirmation 0002_realmcreationkey 2022-04-23 08:49:23.341577+00 -130 confirmation 0003_emailchangeconfirmation 2022-04-23 08:49:23.353803+00 -131 confirmation 0004_remove_confirmationmanager 2022-04-23 08:49:23.420155+00 -132 confirmation 0005_confirmation_realm 2022-04-23 08:49:23.535205+00 -133 confirmation 0006_realmcreationkey_presume_email_valid 2022-04-23 08:49:23.560842+00 -134 confirmation 0007_add_indexes 2022-04-23 08:49:24.15086+00 -135 confirmation 0008_confirmation_expiry_date 2022-04-23 08:49:24.213399+00 -136 confirmation 0009_confirmation_expiry_date_backfill 2022-04-23 08:49:24.301262+00 -137 confirmation 0010_alter_confirmation_expiry_date 2022-04-23 08:49:24.353482+00 -138 confirmation 0011_alter_confirmation_expiry_date 2022-04-23 08:49:24.416109+00 -139 otp_static 0001_initial 2022-04-23 08:49:24.652705+00 -140 otp_static 0002_throttling 2022-04-23 08:49:24.830187+00 -141 otp_totp 0001_initial 2022-04-23 08:49:24.962627+00 -142 otp_totp 0002_auto_20190420_0723 2022-04-23 08:49:25.117131+00 -143 sessions 0001_initial 2022-04-23 08:49:25.148427+00 -144 default 0001_initial 2022-04-23 08:49:26.030406+00 -145 social_auth 0001_initial 2022-04-23 08:49:26.034858+00 -146 default 0002_add_related_name 2022-04-23 08:49:26.133669+00 -147 social_auth 0002_add_related_name 2022-04-23 08:49:26.137415+00 -148 default 0003_alter_email_max_length 2022-04-23 08:49:26.158526+00 -149 social_auth 0003_alter_email_max_length 2022-04-23 08:49:26.162922+00 -150 default 0004_auto_20160423_0400 2022-04-23 08:49:26.243909+00 -151 social_auth 0004_auto_20160423_0400 2022-04-23 08:49:26.248195+00 -152 social_auth 0005_auto_20160727_2333 2022-04-23 08:49:26.268298+00 -153 social_django 0006_partial 2022-04-23 08:49:26.307188+00 -154 social_django 0007_code_timestamp 2022-04-23 08:49:26.3461+00 -155 social_django 0008_partial_timestamp 2022-04-23 08:49:26.384714+00 -156 social_django 0009_auto_20191118_0520 2022-04-23 08:49:26.569175+00 -157 social_django 0010_uid_db_index 2022-04-23 08:49:26.665563+00 -158 two_factor 0001_initial 2022-04-23 08:49:26.779471+00 -159 two_factor 0002_auto_20150110_0810 2022-04-23 08:49:26.866085+00 -160 two_factor 0003_auto_20150817_1733 2022-04-23 08:49:27.029979+00 -161 two_factor 0004_auto_20160205_1827 2022-04-23 08:49:27.11787+00 -162 two_factor 0005_auto_20160224_0450 2022-04-23 08:49:27.952698+00 -163 two_factor 0006_phonedevice_key_default 2022-04-23 08:49:28.008459+00 -164 two_factor 0007_auto_20201201_1019 2022-04-23 08:49:28.113385+00 -165 zerver 0125_realm_max_invites 2022-04-23 08:49:28.168766+00 -166 zerver 0126_prereg_remove_users_without_realm 2022-04-23 08:49:28.226518+00 -167 zerver 0127_disallow_chars_in_stream_and_user_name 2022-04-23 08:49:28.228964+00 -168 zerver 0128_scheduledemail_realm 2022-04-23 08:49:28.389957+00 -169 zerver 0129_remove_userprofile_autoscroll_forever 2022-04-23 08:49:28.487596+00 -170 zerver 0130_text_choice_in_emojiset 2022-04-23 08:49:29.134691+00 -171 zerver 0131_realm_create_generic_bot_by_admins_only 2022-04-23 08:49:29.213858+00 -172 zerver 0132_realm_message_visibility_limit 2022-04-23 08:49:29.261904+00 -173 zerver 0133_rename_botuserconfigdata_botconfigdata 2022-04-23 08:49:29.36721+00 -174 zerver 0134_scheduledmessage 2022-04-23 08:49:29.459119+00 -175 zerver 0135_scheduledmessage_delivery_type 2022-04-23 08:49:29.548496+00 -176 zerver 0136_remove_userprofile_quota 2022-04-23 08:49:29.601346+00 -177 zerver 0137_realm_upload_quota_gb 2022-04-23 08:49:29.639572+00 -178 zerver 0138_userprofile_realm_name_in_notifications 2022-04-23 08:49:29.726322+00 -179 zerver 0139_fill_last_message_id_in_subscription_logs 2022-04-23 08:49:29.912522+00 -180 zerver 0140_realm_send_welcome_emails 2022-04-23 08:49:29.970078+00 -181 zerver 0141_change_usergroup_description_to_textfield 2022-04-23 08:49:30.035538+00 -182 zerver 0142_userprofile_translate_emoticons 2022-04-23 08:49:30.126014+00 -183 zerver 0143_realm_bot_creation_policy 2022-04-23 08:49:30.314382+00 -184 zerver 0144_remove_realm_create_generic_bot_by_admins_only 2022-04-23 08:49:30.381137+00 -185 zerver 0145_reactions_realm_emoji_name_to_id 2022-04-23 08:49:30.484309+00 -186 zerver 0146_userprofile_message_content_in_email_notifications 2022-04-23 08:49:30.614169+00 -187 zerver 0147_realm_disallow_disposable_email_addresses 2022-04-23 08:49:30.666961+00 -188 zerver 0148_max_invites_forget_default 2022-04-23 08:49:30.765283+00 -189 zerver 0149_realm_emoji_drop_unique_constraint 2022-04-23 08:49:31.202057+00 -190 zerver 0150_realm_allow_community_topic_editing 2022-04-23 08:49:31.258122+00 -191 zerver 0151_last_reminder_default_none 2022-04-23 08:49:31.320369+00 -192 zerver 0152_realm_default_twenty_four_hour_time 2022-04-23 08:49:31.380374+00 -193 zerver 0153_remove_int_float_custom_fields 2022-04-23 08:49:31.458037+00 -194 zerver 0154_fix_invalid_bot_owner 2022-04-23 08:49:31.570241+00 -195 zerver 0155_change_default_realm_description 2022-04-23 08:49:31.639816+00 -196 zerver 0156_add_hint_to_profile_field 2022-04-23 08:49:31.707319+00 -197 zerver 0157_userprofile_is_guest 2022-04-23 08:49:31.814672+00 -198 zerver 0158_realm_video_chat_provider 2022-04-23 08:49:31.876404+00 -199 zerver 0159_realm_google_hangouts_domain 2022-04-23 08:49:31.957813+00 -200 zerver 0160_add_choice_field 2022-04-23 08:49:32.314066+00 -201 zerver 0161_realm_message_content_delete_limit_seconds 2022-04-23 08:49:32.378273+00 -202 zerver 0162_change_default_community_topic_editing 2022-04-23 08:49:32.432214+00 -203 zerver 0163_remove_userprofile_default_desktop_notifications 2022-04-23 08:49:32.485591+00 -204 zerver 0164_stream_history_public_to_subscribers 2022-04-23 08:49:32.585629+00 -205 zerver 0165_add_date_to_profile_field 2022-04-23 08:49:32.623583+00 -206 zerver 0166_add_url_to_profile_field 2022-04-23 08:49:32.665627+00 -207 zerver 0167_custom_profile_fields_sort_order 2022-04-23 08:49:32.759549+00 -208 zerver 0168_stream_is_web_public 2022-04-23 08:49:32.81007+00 -209 zerver 0169_stream_is_announcement_only 2022-04-23 08:49:32.865483+00 -210 zerver 0170_submessage 2022-04-23 08:49:32.938969+00 -211 zerver 0171_userprofile_dense_mode 2022-04-23 08:49:33.056744+00 -212 zerver 0172_add_user_type_of_custom_profile_field 2022-04-23 08:49:33.232948+00 -213 zerver 0173_support_seat_based_plans 2022-04-23 08:49:33.372527+00 -214 zerver 0174_userprofile_delivery_email 2022-04-23 08:49:33.521157+00 -215 zerver 0175_change_realm_audit_log_event_type_tense 2022-04-23 08:49:33.57476+00 -216 zerver 0176_remove_subscription_notifications 2022-04-23 08:49:33.62117+00 -217 zerver 0177_user_message_add_and_index_is_private_flag 2022-04-23 08:49:33.777515+00 -218 zerver 0178_rename_to_emails_restricted_to_domains 2022-04-23 08:49:33.810283+00 -219 zerver 0179_rename_to_digest_emails_enabled 2022-04-23 08:49:33.990089+00 -220 zerver 0180_usermessage_add_active_mobile_push_notification 2022-04-23 08:49:34.109125+00 -221 zerver 0181_userprofile_change_emojiset 2022-04-23 08:49:34.202096+00 -222 zerver 0182_set_initial_value_is_private_flag 2022-04-23 08:49:34.254887+00 -223 zerver 0183_change_custom_field_name_max_length 2022-04-23 08:49:34.303372+00 -224 zerver 0184_rename_custom_field_types 2022-04-23 08:49:34.336625+00 -225 zerver 0185_realm_plan_type 2022-04-23 08:49:34.392815+00 -226 zerver 0186_userprofile_starred_message_counts 2022-04-23 08:49:34.490562+00 -227 zerver 0187_userprofile_is_billing_admin 2022-04-23 08:49:34.589674+00 -228 zerver 0188_userprofile_enable_login_emails 2022-04-23 08:49:34.830038+00 -229 zerver 0189_userprofile_add_some_emojisets 2022-04-23 08:49:34.94495+00 -230 zerver 0190_cleanup_pushdevicetoken 2022-04-23 08:49:35.029954+00 -231 zerver 0191_realm_seat_limit 2022-04-23 08:49:35.062459+00 -232 zerver 0192_customprofilefieldvalue_rendered_value 2022-04-23 08:49:35.110971+00 -233 zerver 0193_realm_email_address_visibility 2022-04-23 08:49:35.168292+00 -234 zerver 0194_userprofile_notification_sound 2022-04-23 08:49:35.285847+00 -235 zerver 0195_realm_first_visible_message_id 2022-04-23 08:49:35.338936+00 -236 zerver 0196_add_realm_logo_fields 2022-04-23 08:49:35.439036+00 -237 zerver 0197_azure_active_directory_auth 2022-04-23 08:49:35.495525+00 -238 zerver 0198_preregistrationuser_invited_as 2022-04-23 08:49:35.722511+00 -239 zerver 0199_userstatus 2022-04-23 08:49:35.786527+00 -240 zerver 0200_remove_preregistrationuser_invited_as_admin 2022-04-23 08:49:35.835015+00 -241 zerver 0201_zoom_video_chat 2022-04-23 08:49:36.000396+00 -242 zerver 0202_add_user_status_info 2022-04-23 08:49:36.096564+00 -243 zerver 0203_realm_message_content_allowed_in_email_notifications 2022-04-23 08:49:36.148786+00 -244 zerver 0204_remove_realm_billing_fields 2022-04-23 08:49:36.213848+00 -245 zerver 0205_remove_realmauditlog_requires_billing_update 2022-04-23 08:49:36.263945+00 -246 zerver 0206_stream_rendered_description 2022-04-23 08:49:36.515678+00 -247 zerver 0207_multiuseinvite_invited_as 2022-04-23 08:49:36.589194+00 -248 zerver 0208_add_realm_night_logo_fields 2022-04-23 08:49:36.691363+00 -249 zerver 0209_stream_first_message_id 2022-04-23 08:49:36.733441+00 -250 zerver 0210_stream_first_message_id 2022-04-23 08:49:36.792488+00 -251 zerver 0211_add_users_field_to_scheduled_email 2022-04-23 08:49:36.950292+00 -252 zerver 0212_make_stream_email_token_unique 2022-04-23 08:49:37.007405+00 -253 zerver 0213_realm_digest_weekday 2022-04-23 08:49:37.189656+00 -254 zerver 0214_realm_invite_to_stream_policy 2022-04-23 08:49:37.308308+00 -255 zerver 0215_realm_avatar_changes_disabled 2022-04-23 08:49:37.358738+00 -256 zerver 0216_add_create_stream_policy 2022-04-23 08:49:37.42109+00 -257 zerver 0217_migrate_create_stream_policy 2022-04-23 08:49:37.493649+00 -258 zerver 0218_remove_create_stream_by_admins_only 2022-04-23 08:49:37.531092+00 -259 zerver 0219_toggle_realm_digest_emails_enabled_default 2022-04-23 08:49:37.615482+00 -260 zerver 0220_subscription_notification_settings 2022-04-23 08:49:37.767117+00 -261 zerver 0221_subscription_notifications_data_migration 2022-04-23 08:49:38.316172+00 -262 zerver 0222_userprofile_fluid_layout_width 2022-04-23 08:49:38.439806+00 -263 zerver 0223_rename_to_is_muted 2022-04-23 08:49:38.59067+00 -264 zerver 0224_alter_field_realm_video_chat_provider 2022-04-23 08:49:38.768663+00 -265 zerver 0225_archived_reaction_model 2022-04-23 08:49:38.888066+00 -266 zerver 0226_archived_submessage_model 2022-04-23 08:49:39.092796+00 -267 zerver 0227_inline_url_embed_preview_default_off 2022-04-23 08:49:39.175159+00 -268 zerver 0228_userprofile_demote_inactive_streams 2022-04-23 08:49:39.271792+00 -269 zerver 0229_stream_message_retention_days 2022-04-23 08:49:39.305998+00 -270 zerver 0230_rename_to_enable_stream_audible_notifications 2022-04-23 08:49:39.366634+00 -271 zerver 0231_add_archive_transaction_model 2022-04-23 08:49:39.779859+00 -272 zerver 0232_make_archive_transaction_field_not_nullable 2022-04-23 08:49:39.848156+00 -273 zerver 0233_userprofile_avatar_hash 2022-04-23 08:49:39.90435+00 -274 zerver 0234_add_external_account_custom_profile_field 2022-04-23 08:49:39.948442+00 -275 zerver 0235_userprofile_desktop_icon_count_display 2022-04-23 08:49:40.082211+00 -276 zerver 0236_remove_illegal_characters_email_full 2022-04-23 08:49:40.162316+00 -277 zerver 0237_rename_zulip_realm_to_zulipinternal 2022-04-23 08:49:40.220213+00 -278 zerver 0238_usermessage_bigint_id 2022-04-23 08:49:40.418522+00 -279 zerver 0239_usermessage_copy_id_to_bigint_id 2022-04-23 08:49:40.491751+00 -280 zerver 0240_usermessage_migrate_bigint_id_into_id 2022-04-23 08:49:40.582554+00 -281 zerver 0241_usermessage_bigint_id_migration_finalize 2022-04-23 08:49:40.683177+00 -282 zerver 0242_fix_bot_email_property 2022-04-23 08:49:40.76144+00 -283 zerver 0243_message_add_date_sent_column 2022-04-23 08:49:40.924201+00 -284 zerver 0244_message_copy_pub_date_to_date_sent 2022-04-23 08:49:41.239308+00 -285 zerver 0245_message_date_sent_finalize_part1 2022-04-23 08:49:41.301208+00 -286 zerver 0246_message_date_sent_finalize_part2 2022-04-23 08:49:41.468538+00 -287 zerver 0247_realmauditlog_event_type_to_int 2022-04-23 08:49:42.235663+00 -288 zerver 0248_userprofile_role_start 2022-04-23 08:49:42.341038+00 -289 zerver 0249_userprofile_role_finish 2022-04-23 08:49:42.546634+00 -290 zerver 0250_saml_auth 2022-04-23 08:49:42.618925+00 -291 zerver 0251_prereg_user_add_full_name 2022-04-23 08:49:42.817824+00 -292 zerver 0252_realm_user_group_edit_policy 2022-04-23 08:49:43.029708+00 -293 zerver 0253_userprofile_wildcard_mentions_notify 2022-04-23 08:49:43.171827+00 -294 zerver 0209_user_profile_no_empty_password 2022-04-23 08:49:43.252944+00 -295 zerver 0254_merge_0209_0253 2022-04-23 08:49:43.259375+00 -296 zerver 0255_userprofile_stream_add_recipient_column 2022-04-23 08:49:43.482227+00 -297 zerver 0256_userprofile_stream_set_recipient_column_values 2022-04-23 08:49:43.505622+00 -298 zerver 0257_fix_has_link_attribute 2022-04-23 08:49:43.615514+00 -299 zerver 0258_enable_online_push_notifications_default 2022-04-23 08:49:43.70549+00 -300 zerver 0259_missedmessageemailaddress 2022-04-23 08:49:43.823887+00 -301 zerver 0260_missed_message_addresses_from_redis_to_db 2022-04-23 08:49:43.88586+00 -302 zerver 0261_realm_private_message_policy 2022-04-23 08:49:44.069857+00 -303 zerver 0262_mutedtopic_date_muted 2022-04-23 08:49:44.136999+00 -304 zerver 0263_stream_stream_post_policy 2022-04-23 08:49:44.201795+00 -305 zerver 0264_migrate_is_announcement_only 2022-04-23 08:49:44.263054+00 -306 zerver 0265_remove_stream_is_announcement_only 2022-04-23 08:49:44.302955+00 -307 zerver 0266_userpresence_realm 2022-04-23 08:49:44.373617+00 -308 zerver 0267_backfill_userpresence_realm_id 2022-04-23 08:49:44.378414+00 -309 zerver 0268_add_userpresence_realm_timestamp_index 2022-04-23 08:49:44.492234+00 -310 zerver 0269_gitlab_auth 2022-04-23 08:49:44.542188+00 -311 zerver 0270_huddle_recipient 2022-04-23 08:49:44.609312+00 -312 zerver 0271_huddle_set_recipient_column_values 2022-04-23 08:49:44.613626+00 -313 zerver 0272_realm_default_code_block_language 2022-04-23 08:49:44.762696+00 -314 zerver 0273_migrate_old_bot_messages 2022-04-23 08:49:44.82912+00 -315 zerver 0274_nullbooleanfield_to_booleanfield 2022-04-23 08:49:45.14514+00 -316 zerver 0275_remove_userprofile_last_pointer_updater 2022-04-23 08:49:45.302631+00 -317 zerver 0276_alertword 2022-04-23 08:49:45.383177+00 -318 zerver 0277_migrate_alert_word 2022-04-23 08:49:45.458565+00 -319 zerver 0278_remove_userprofile_alert_words 2022-04-23 08:49:45.515872+00 -320 zerver 0279_message_recipient_subject_indexes 2022-04-23 08:49:45.615026+00 -321 zerver 0280_userprofile_presence_enabled 2022-04-23 08:49:45.746931+00 -322 zerver 0281_zoom_oauth 2022-04-23 08:49:45.815729+00 -323 zerver 0282_remove_zoom_video_chat 2022-04-23 08:49:45.909811+00 -324 zerver 0283_apple_auth 2022-04-23 08:49:46.073679+00 -325 zerver 0284_convert_realm_admins_to_realm_owners 2022-04-23 08:49:46.138313+00 -326 zerver 0285_remove_realm_google_hangouts_domain 2022-04-23 08:49:46.225971+00 -327 zerver 0261_pregistrationuser_clear_invited_as_admin 2022-04-23 08:49:46.282454+00 -328 zerver 0286_merge_0260_0285 2022-04-23 08:49:46.285126+00 -329 zerver 0287_clear_duplicate_reactions 2022-04-23 08:49:46.345376+00 -330 zerver 0288_reaction_unique_on_emoji_code 2022-04-23 08:49:46.439237+00 -331 zerver 0289_tighten_attachment_size 2022-04-23 08:49:46.644264+00 -332 zerver 0290_remove_night_mode_add_color_scheme 2022-04-23 08:49:46.841871+00 -333 zerver 0291_realm_retention_days_not_null 2022-04-23 08:49:46.875298+00 -334 zerver 0292_update_default_value_of_invited_as 2022-04-23 08:49:46.980184+00 -335 zerver 0293_update_invite_as_dict_values 2022-04-23 08:49:47.040758+00 -336 zerver 0294_remove_userprofile_pointer 2022-04-23 08:49:47.095292+00 -337 zerver 0295_case_insensitive_email_indexes 2022-04-23 08:49:47.171294+00 -338 zerver 0296_remove_userprofile_short_name 2022-04-23 08:49:47.224211+00 -339 zerver 0297_draft 2022-04-23 08:49:47.454975+00 -340 zerver 0298_fix_realmauditlog_format 2022-04-23 08:49:47.530158+00 -341 zerver 0299_subscription_role 2022-04-23 08:49:47.593648+00 -342 zerver 0300_add_attachment_is_web_public 2022-04-23 08:49:47.772071+00 -343 zerver 0301_fix_unread_messages_in_deactivated_streams 2022-04-23 08:49:47.78494+00 -344 zerver 0302_case_insensitive_stream_name_index 2022-04-23 08:49:47.837582+00 -345 zerver 0303_realm_wildcard_mention_policy 2022-04-23 08:49:47.890381+00 -346 zerver 0304_remove_default_status_of_default_private_streams 2022-04-23 08:49:47.951886+00 -347 zerver 0305_realm_deactivated_redirect 2022-04-23 08:49:47.986549+00 -348 zerver 0306_custom_profile_field_date_format 2022-04-23 08:49:47.993057+00 -349 zerver 0307_rename_api_super_user_to_can_forge_sender 2022-04-23 08:49:48.052387+00 -350 zerver 0308_remove_reduntant_realm_meta_permissions 2022-04-23 08:49:48.095608+00 -351 zerver 0309_userprofile_can_create_users 2022-04-23 08:49:48.363213+00 -352 zerver 0310_jsonfield 2022-04-23 08:49:48.366817+00 -353 zerver 0311_userprofile_default_view 2022-04-23 08:49:48.469249+00 -354 zerver 0312_subscription_is_user_active 2022-04-23 08:49:48.522425+00 -355 zerver 0313_finish_is_user_active_migration 2022-04-23 08:49:48.664713+00 -356 zerver 0314_muted_user 2022-04-23 08:49:48.736277+00 -357 zerver 0315_realmplayground 2022-04-23 08:49:48.863474+00 -358 zerver 0316_realm_invite_to_realm_policy 2022-04-23 08:49:48.927227+00 -359 zerver 0317_migrate_to_invite_to_realm_policy 2022-04-23 08:49:49.100939+00 -360 zerver 0318_remove_realm_invite_by_admins_only 2022-04-23 08:49:49.141981+00 -361 zerver 0319_realm_giphy_rating 2022-04-23 08:49:49.208516+00 -362 zerver 0320_realm_move_messages_between_streams_policy 2022-04-23 08:49:49.284209+00 -363 zerver 0321_userprofile_enable_marketing_emails 2022-04-23 08:49:49.407218+00 -364 zerver 0322_realm_create_audit_log_backfill 2022-04-23 08:49:49.486213+00 -365 zerver 0323_show_starred_message_counts 2022-04-23 08:49:49.592684+00 -366 zerver 0324_fix_deletion_cascade_behavior 2022-04-23 08:49:49.903204+00 -367 zerver 0325_alter_realmplayground_unique_together 2022-04-23 08:49:49.950556+00 -368 zerver 0359_re2_linkifiers 2022-04-23 08:49:50.016613+00 -369 zerver 0326_alter_realm_authentication_methods 2022-04-23 08:49:50.058041+00 -370 zerver 0327_realm_edit_topic_policy 2022-04-23 08:49:50.113735+00 -371 zerver 0328_migrate_to_edit_topic_policy 2022-04-23 08:49:50.17885+00 -372 zerver 0329_remove_realm_allow_community_topic_editing 2022-04-23 08:49:50.219635+00 -373 zerver 0330_linkifier_pattern_validator 2022-04-23 08:49:50.258399+00 -374 zerver 0331_scheduledmessagenotificationemail 2022-04-23 08:49:50.3787+00 -375 zerver 0332_realmuserdefault 2022-04-23 08:49:50.934343+00 -376 zerver 0333_alter_realm_org_type 2022-04-23 08:49:51.031983+00 -377 zerver 0334_email_notifications_batching_period 2022-04-23 08:49:51.174231+00 -378 zerver 0335_add_draft_sync_field 2022-04-23 08:49:51.331266+00 -379 zerver 0336_userstatus_status_emoji 2022-04-23 08:49:51.528997+00 -380 zerver 0337_realm_add_custom_emoji_policy 2022-04-23 08:49:51.599884+00 -381 zerver 0338_migrate_to_add_custom_emoji_policy 2022-04-23 08:49:51.797376+00 -382 zerver 0339_remove_realm_add_emoji_by_admins_only 2022-04-23 08:49:51.847104+00 -383 zerver 0340_rename_mutedtopic_to_usertopic 2022-04-23 08:49:52.0519+00 -384 zerver 0341_usergroup_is_system_group 2022-04-23 08:49:52.125081+00 -385 zerver 0342_realm_demo_organization_scheduled_deletion_date 2022-04-23 08:49:52.171609+00 -386 zerver 0343_alter_useractivityinterval_index_together 2022-04-23 08:49:52.232237+00 -387 zerver 0344_alter_emojiset_default_value 2022-04-23 08:49:52.444784+00 -388 zerver 0345_alter_realm_name 2022-04-23 08:49:52.54687+00 -389 zerver 0346_create_realm_user_default_table 2022-04-23 08:49:52.612501+00 -390 zerver 0347_realm_emoji_animated 2022-04-23 08:49:52.698981+00 -391 zerver 0348_rename_date_muted_usertopic_last_updated 2022-04-23 08:49:52.769813+00 -392 zerver 0349_alter_usertopic_table 2022-04-23 08:49:52.824661+00 -393 zerver 0350_usertopic_visibility_policy 2022-04-23 08:49:52.892279+00 -394 zerver 0351_user_topic_visibility_indexes 2022-04-23 08:49:53.026695+00 -395 zerver 0352_migrate_twenty_four_hour_time_to_realmuserdefault 2022-04-23 08:49:53.304181+00 -396 zerver 0353_remove_realm_default_twenty_four_hour_time 2022-04-23 08:49:53.352983+00 -397 zerver 0354_alter_realm_message_content_delete_limit_seconds 2022-04-23 08:49:53.509485+00 -398 zerver 0355_realm_delete_own_message_policy 2022-04-23 08:49:53.567748+00 -399 zerver 0356_migrate_to_delete_own_message_policy 2022-04-23 08:49:53.63838+00 -400 zerver 0357_remove_realm_allow_message_deleting 2022-04-23 08:49:53.679691+00 -401 zerver 0358_split_create_stream_policy 2022-04-23 08:49:54.327937+00 -402 zerver 0360_merge_0358_0359 2022-04-23 08:49:54.334311+00 -403 zerver 0361_realm_create_web_public_stream_policy 2022-04-23 08:49:54.427638+00 -404 zerver 0362_send_typing_notifications_user_setting 2022-04-23 08:49:54.898649+00 -405 zerver 0363_send_read_receipts_user_setting 2022-04-23 08:49:55.057935+00 -406 zerver 0364_rename_members_usergroup_direct_members 2022-04-23 08:49:55.117643+00 -407 zerver 0365_alter_user_group_related_fields 2022-04-23 08:49:55.403503+00 -408 zerver 0366_group_group_membership 2022-04-23 08:49:55.543727+00 -409 zerver 0367_scimclient 2022-04-23 08:49:55.618136+00 -410 zerver 0368_alter_realmfilter_url_format_string 2022-04-23 08:49:55.657783+00 -411 zerver 0369_add_escnav_default_display_user_setting 2022-04-23 08:49:55.853095+00 -412 zerver 0370_realm_enable_spectator_access 2022-04-23 08:49:55.974053+00 -413 zerver 0371_invalid_characters_in_topics 2022-04-23 08:49:56.396561+00 -414 zerver 0372_realmemoji_unique_realm_emoji_when_false_deactivated 2022-04-23 08:49:56.492538+00 -415 zerver 0373_fix_deleteduser_dummies 2022-04-23 08:49:56.585197+00 -416 zerver 0374_backfill_user_delete_realmauditlog 2022-04-23 08:49:56.660042+00 -417 zerver 0375_invalid_characters_in_stream_names 2022-04-23 08:49:56.726223+00 -418 zerver 0376_set_realmemoji_author_and_reupload_realmemoji 2022-04-23 08:49:56.797362+00 -419 zerver 0377_message_edit_history_format 2022-04-23 08:49:56.864081+00 -420 zerver 0378_alter_realmuserdefault_realm 2022-04-23 08:49:56.945719+00 -421 zerver 0379_userprofile_uuid 2022-04-23 08:49:57.163057+00 -422 zerver 0380_userprofile_uuid_backfill 2022-04-23 08:49:57.22681+00 -423 zerver 0381_alter_userprofile_uuid 2022-04-23 08:49:57.295768+00 -424 zerver 0382_create_role_based_system_groups 2022-04-23 08:49:57.35996+00 -425 zerver 0383_revoke_invitations_from_deactivated_users 2022-04-23 08:49:57.425643+00 -426 zerver 0384_alter_realm_not_null 2022-04-23 08:49:57.548365+00 -427 zerver 0385_attachment_flags_cache 2022-04-23 08:49:57.852923+00 -428 zerver 0386_fix_attachment_caches 2022-04-23 08:49:57.971896+00 -429 zerver 0387_reupload_realmemoji_again 2022-04-23 08:49:58.034642+00 -430 social_django 0005_auto_20160727_2333 2022-04-23 08:49:58.041652+00 -431 social_django 0004_auto_20160423_0400 2022-04-23 08:49:58.044505+00 -432 social_django 0001_initial 2022-04-23 08:49:58.047485+00 -433 social_django 0002_add_related_name 2022-04-23 08:49:58.051499+00 -434 social_django 0003_alter_email_max_length 2022-04-23 08:49:58.056361+00 -435 zerver 0388_preregistrationuser_created_user 2022-12-16 08:52:51.010081+00 -436 zerver 0389_userprofile_display_emoji_reaction_users 2022-12-16 08:52:51.069474+00 -437 zerver 0390_fix_stream_history_public_to_subscribers 2022-12-16 08:52:51.189947+00 -438 zerver 0391_alter_stream_history_public_to_subscribers 2022-12-16 08:52:51.229303+00 -439 zerver 0392_non_nullable_fields 2022-12-16 08:52:51.398906+00 -440 zerver 0393_realm_want_advertise_in_communities_directory 2022-12-16 08:52:51.42705+00 -441 zerver 0394_alter_realm_want_advertise_in_communities_directory 2022-12-16 08:52:51.459809+00 -442 zerver 0395_alter_realm_wildcard_mention_policy 2022-12-16 08:52:51.649249+00 -443 zerver 0396_remove_subscription_role 2022-12-16 08:52:51.682954+00 -444 zerver 0397_remove_custom_field_values_for_deleted_options 2022-12-16 08:52:51.725285+00 -445 zerver 0398_tsvector_statistics 2022-12-16 08:52:51.734833+00 -446 zerver 0399_preregistrationuser_multiuse_invite 2022-12-16 08:52:51.784105+00 -447 zerver 0400_realmreactivationstatus 2022-12-16 08:52:51.841136+00 -448 zerver 0401_migrate_old_realm_reactivation_links 2022-12-16 08:52:51.885124+00 -449 zerver 0402_alter_usertopic_visibility_policy 2022-12-16 08:52:51.919123+00 -450 zerver 0403_create_role_based_groups_for_internal_realms 2022-12-16 08:52:51.968455+00 -451 zerver 0404_realm_enable_read_receipts 2022-12-16 08:52:52.109299+00 -452 zerver 0405_set_default_for_enable_read_receipts 2022-12-16 08:52:52.151054+00 -453 zerver 0406_alter_realm_message_content_edit_limit_seconds 2022-12-16 08:52:52.24003+00 -454 zerver 0407_userprofile_user_list_style 2022-12-16 08:52:52.302283+00 -455 zerver 0408_stream_can_remove_subscribers_group 2022-12-16 08:52:52.357559+00 -456 zerver 0409_set_default_for_can_remove_subscribers_group 2022-12-16 08:52:52.403804+00 -457 zerver 0410_alter_stream_can_remove_subscribers_group 2022-12-16 08:52:52.580363+00 -458 zerver 0411_alter_muteduser_muted_user_and_more 2022-12-16 08:52:52.652784+00 -459 zerver 0412_customprofilefield_display_in_profile_summary 2022-12-16 08:52:52.677828+00 -460 zerver 0413_set_presence_enabled_false_for_user_status_away 2022-12-16 08:52:52.71955+00 -461 zerver 0414_remove_userstatus_status 2022-12-16 08:52:52.754601+00 -462 zerver 0415_delete_scimclient 2022-12-16 08:52:52.762918+00 -463 zerver 0416_set_default_emoji_style 2022-12-16 08:52:52.803677+00 -464 zerver 0417_alter_customprofilefield_field_type 2022-12-16 08:52:52.827816+00 -465 zerver 0418_archivedmessage_realm_message_realm 2022-12-16 08:52:53.022112+00 -466 zerver 0419_backfill_message_realm 2022-12-16 08:52:53.080725+00 -467 zerver 0420_alter_archivedmessage_realm_alter_message_realm 2022-12-16 08:52:53.165982+00 -468 zerver 0421_migrate_pronouns_custom_profile_fields 2022-12-16 08:52:53.206795+00 -469 zerver 0422_multiuseinvite_status 2022-12-16 08:52:53.2437+00 -470 two_factor 0008_delete_phonedevice 2023-06-09 13:23:00.696734+00 -471 phonenumber 0001_initial 2023-06-09 13:23:00.761132+00 -472 social_django 0011_alter_id_fields 2023-06-09 13:23:00.903004+00 -473 zerver 0423_fix_email_gateway_attachment_owner 2023-06-09 13:23:00.97452+00 -474 zerver 0424_realm_move_messages_within_stream_limit_seconds 2023-06-09 13:23:01.010252+00 -475 zerver 0425_realm_move_messages_between_streams_limit_seconds 2023-06-09 13:23:01.129346+00 -476 zerver 0426_add_email_address_visibility_setting 2023-06-09 13:23:01.217277+00 -477 zerver 0427_migrate_to_user_level_email_address_visibility_setting 2023-06-09 13:23:01.277542+00 -478 zerver 0428_remove_realm_email_address_visibility 2023-06-09 13:23:01.307848+00 -479 zerver 0429_user_topic_case_insensitive_unique_toghether 2023-06-09 13:23:01.392622+00 -480 zerver 0430_fix_audit_log_objects_for_group_based_stream_settings 2023-06-09 13:23:01.440558+00 -481 zerver 0431_alter_archivedreaction_unique_together_and_more 2023-06-09 13:23:01.518376+00 -482 zerver 0432_alter_and_migrate_realm_name_in_notifications 2023-06-09 13:23:01.856089+00 -483 zerver 0433_preregistrationrealm 2023-06-09 13:23:01.91606+00 -484 zerver 0434_create_nobody_system_group 2023-06-09 13:23:01.966991+00 -485 zerver 0435_scheduledmessage_rendered_content 2023-06-09 13:23:02.012274+00 -486 zerver 0436_realmauthenticationmethods 2023-06-09 13:23:02.270707+00 -487 zerver 0437_remove_realm_authentication_methods 2023-06-09 13:23:02.308274+00 -488 zerver 0438_add_web_mark_read_on_scroll_policy_setting 2023-06-09 13:23:02.385539+00 -489 zerver 0439_fix_deleteduser_email 2023-06-09 13:23:02.437636+00 -490 zerver 0440_realmfilter_url_template 2023-06-09 13:23:02.494878+00 -491 zerver 0441_backfill_realmfilter_url_template 2023-06-09 13:23:02.542798+00 -492 zerver 0442_remove_realmfilter_url_format_string 2023-06-09 13:23:02.709597+00 -493 zerver 0443_userpresence_new_table_schema 2023-06-09 13:23:02.881575+00 -494 zerver 0444_userpresence_fill_data 2023-06-09 13:23:02.954052+00 -495 zerver 0445_drop_userpresenceold 2023-06-09 13:23:02.962851+00 -496 zerver 0446_realmauditlog_zerver_realmauditlog_user_subscriptions_idx 2023-06-09 13:23:03.008691+00 -497 zerver 0447_attachment_scheduled_messages_and_more 2023-06-09 13:23:03.112574+00 -498 zerver 0448_scheduledmessage_new_fields 2023-06-09 13:23:03.377179+00 -499 zerver 0449_scheduledmessage_zerver_unsent_scheduled_messages_indexes 2023-06-09 13:23:03.471585+00 -500 zerver 0450_backfill_subscription_auditlogs 2023-06-09 13:23:03.530409+00 -501 zerver 0451_add_userprofile_api_key_index 2023-06-09 13:23:03.583924+00 -502 analytics 0017_regenerate_partial_indexes 2023-12-31 14:26:01.303492+00 -503 social_django 0012_usersocialauth_extra_data_new 2023-12-31 14:26:01.340507+00 -504 social_django 0013_migrate_extra_data 2023-12-31 14:26:01.370915+00 -505 social_django 0014_remove_usersocialauth_extra_data 2023-12-31 14:26:01.394675+00 -506 social_django 0015_rename_extra_data_new_usersocialauth_extra_data 2023-12-31 14:26:01.418523+00 -507 zerver 0452_realmauditlog_extra_data_json 2023-12-31 14:26:01.444331+00 -508 zerver 0453_followed_topic_notifications 2023-12-31 14:26:01.695478+00 -509 zerver 0454_usergroup_can_mention_group 2023-12-31 14:26:01.726998+00 -510 zerver 0455_set_default_for_can_mention_group 2023-12-31 14:26:01.765911+00 -511 zerver 0456_alter_usergroup_can_mention_group 2023-12-31 14:26:01.805939+00 -512 zerver 0457_backfill_scheduledmessagenotificationemail_trigger 2023-12-31 14:26:01.809825+00 -513 zerver 0458_realmauditlog_modified_user_group 2023-12-31 14:26:01.887172+00 -514 zerver 0459_remove_invalid_characters_from_user_group_name 2023-12-31 14:26:01.925814+00 -515 zerver 0460_backfill_realmauditlog_extradata_to_json_field 2023-12-31 14:26:01.961334+00 -516 zerver 0461_alter_realm_default_code_block_language 2023-12-31 14:26:02.021282+00 -517 zerver 0462_realmplayground_url_template 2023-12-31 14:26:02.039102+00 -518 zerver 0463_backfill_realmplayground_url_template 2023-12-31 14:26:02.067074+00 -519 zerver 0464_remove_realmplayground_url_prefix 2023-12-31 14:26:02.100182+00 -520 zerver 0465_backfill_scheduledmessagenotificationemail_trigger 2023-12-31 14:26:02.103095+00 -521 zerver 0466_realmfilter_order 2023-12-31 14:26:02.196952+00 -522 zerver 0467_rename_extradata_realmauditlog_extra_data_json 2023-12-31 14:26:02.246857+00 -523 zerver 0468_rename_followup_day_email_templates 2023-12-31 14:26:02.275763+00 -524 zerver 0469_realm_create_multiuse_invite_group 2023-12-31 14:26:02.304503+00 -525 zerver 0470_set_default_value_for_create_multiuse_invite_group 2023-12-31 14:26:02.334042+00 -526 zerver 0471_alter_realm_create_multiuse_invite_group 2023-12-31 14:26:02.364889+00 -527 zerver 0472_add_message_realm_id_indexes 2023-12-31 14:26:02.654531+00 -528 zerver 0473_remove_message_non_realm_id_indexes 2023-12-31 14:26:02.807168+00 -529 zerver 0474_realmuserdefault_web_stream_unreads_count_display_policy_and_more 2023-12-31 14:26:02.849471+00 -530 zerver 0475_realm_jitsi_server_url 2023-12-31 14:26:02.868915+00 -531 zerver 0476_realmuserdefault_automatically_follow_topics_policy_and_more 2023-12-31 14:26:02.949969+00 -532 zerver 0477_alter_realmuserdefault_automatically_follow_topics_policy_and_more 2023-12-31 14:26:02.952308+00 -533 zerver 0478_realm_enable_guest_user_indicator 2023-12-31 14:26:02.971447+00 -534 zerver 0479_realm_uuid_realm_uuid_owner_secret 2023-12-31 14:26:03.062022+00 -535 zerver 0480_realm_backfill_uuid_and_secret 2023-12-31 14:26:03.092594+00 -536 zerver 0481_alter_realm_uuid_alter_realm_uuid_owner_secret 2023-12-31 14:26:03.131229+00 -537 zerver 0482_automatically_follow_unmute_topics_policy_defaults 2023-12-31 14:26:03.265404+00 -538 zerver 0483_rename_escape_navigates_to_default_view_realmuserdefault_web_escape_navigates_to_home_view_and_more 2023-12-31 14:26:03.4343+00 -539 zerver 0484_preregistrationrealm_default_language 2023-12-31 14:26:03.461103+00 -540 zerver 0485_alter_usermessage_flags_and_add_index 2023-12-31 14:26:03.525846+00 -541 zerver 0486_clear_old_data_for_unused_usermessage_flags 2023-12-31 14:26:03.598012+00 -542 zerver 0487_realm_can_access_all_users_group 2023-12-31 14:26:03.628938+00 -543 zerver 0488_set_default_value_for_can_access_all_users_group 2023-12-31 14:26:03.722883+00 -544 zerver 0489_alter_realm_can_access_all_users_group 2023-12-31 14:26:03.756384+00 -545 zerver 0490_renumber_options_desktop_icon_count_display 2023-12-31 14:26:03.787483+00 -546 zerver 0491_alter_realmuserdefault_web_home_view_and_more 2023-12-31 14:26:03.834704+00 -547 zerver 0492_realm_push_notifications_enabled_and_more 2023-12-31 14:26:03.875918+00 -548 zerver 0493_rename_userhotspot_to_onboardingstep 2023-12-31 14:26:04.018613+00 -549 zerver 0494_realmuserdefault_automatically_follow_topics_where_mentioned_and_more 2023-12-31 14:26:04.061845+00 -550 zerver 0495_scheduledmessage_read_by_sender 2023-12-31 14:26:04.088383+00 -551 zerver 0496_alter_scheduledmessage_read_by_sender 2023-12-31 14:26:04.147161+00 -552 two_factor 0001_squashed_0008_delete_phonedevice 2023-12-31 14:26:04.153064+00 +1 contenttypes 0001_initial 2024-08-02 08:55:33.87185+00 +2 auth 0001_initial 2024-08-02 08:55:33.885552+00 +3 zerver 0001_initial 2024-08-02 08:55:34.465024+00 +4 zerver 0029_realm_subdomain 2024-08-02 08:55:34.485235+00 +5 zerver 0030_realm_org_type 2024-08-02 08:55:34.492885+00 +6 zerver 0031_remove_system_avatar_source 2024-08-02 08:55:34.502989+00 +7 zerver 0032_verify_all_medium_avatar_images 2024-08-02 08:55:34.516295+00 +8 zerver 0033_migrate_domain_to_realmalias 2024-08-02 08:55:34.527452+00 +9 zerver 0034_userprofile_enable_online_push_notifications 2024-08-02 08:55:34.538273+00 +10 zerver 0035_realm_message_retention_period_days 2024-08-02 08:55:34.544384+00 +11 zerver 0036_rename_subdomain_to_string_id 2024-08-02 08:55:34.550765+00 +12 zerver 0037_disallow_null_string_id 2024-08-02 08:55:34.567971+00 +13 zerver 0038_realm_change_to_community_defaults 2024-08-02 08:55:34.585453+00 +14 zerver 0039_realmalias_drop_uniqueness 2024-08-02 08:55:34.595968+00 +15 zerver 0040_realm_authentication_methods 2024-08-02 08:55:34.602607+00 +16 zerver 0041_create_attachments_for_old_messages 2024-08-02 08:55:34.676781+00 +17 zerver 0042_attachment_file_name_length 2024-08-02 08:55:34.68666+00 +18 zerver 0043_realm_filter_validators 2024-08-02 08:55:34.687239+00 +19 zerver 0044_reaction 2024-08-02 08:55:34.710967+00 +20 zerver 0045_realm_waiting_period_threshold 2024-08-02 08:55:34.71794+00 +21 zerver 0046_realmemoji_author 2024-08-02 08:55:34.729468+00 +22 zerver 0047_realm_add_emoji_by_admins_only 2024-08-02 08:55:34.7361+00 +23 zerver 0048_enter_sends_default_to_false 2024-08-02 08:55:34.746931+00 +24 zerver 0049_userprofile_pm_content_in_desktop_notifications 2024-08-02 08:55:34.757074+00 +25 zerver 0050_userprofile_avatar_version 2024-08-02 08:55:34.767909+00 +26 analytics 0001_initial 2024-08-02 08:55:34.886536+00 +27 analytics 0002_remove_huddlecount 2024-08-02 08:55:34.94074+00 +28 analytics 0003_fillstate 2024-08-02 08:55:34.944223+00 +29 analytics 0004_add_subgroup 2024-08-02 08:55:35.020727+00 +30 analytics 0005_alter_field_size 2024-08-02 08:55:35.095769+00 +31 analytics 0006_add_subgroup_to_unique_constraints 2024-08-02 08:55:35.13317+00 +32 analytics 0007_remove_interval 2024-08-02 08:55:35.197284+00 +33 analytics 0008_add_count_indexes 2024-08-02 08:55:35.225076+00 +34 analytics 0009_remove_messages_to_stream_stat 2024-08-02 08:55:35.240495+00 +35 analytics 0010_clear_messages_sent_values 2024-08-02 08:55:35.254733+00 +36 analytics 0011_clear_analytics_tables 2024-08-02 08:55:35.269009+00 +37 analytics 0012_add_on_delete 2024-08-02 08:55:35.316163+00 +38 analytics 0013_remove_anomaly 2024-08-02 08:55:35.418478+00 +39 analytics 0014_remove_fillstate_last_modified 2024-08-02 08:55:35.420363+00 +40 analytics 0015_clear_duplicate_counts 2024-08-02 08:55:35.436635+00 +41 analytics 0016_unique_constraint_when_subgroup_null 2024-08-02 08:55:35.521885+00 +42 analytics 0017_regenerate_partial_indexes 2024-08-02 08:55:35.629234+00 +43 analytics 0018_remove_usercount_active_users_audit 2024-08-02 08:55:35.630432+00 +44 analytics 0019_remove_unused_counts 2024-08-02 08:55:35.631708+00 +45 analytics 0020_alter_installationcount_id_alter_realmcount_id_and_more 2024-08-02 08:55:35.671667+00 +46 analytics 0021_alter_fillstate_id 2024-08-02 08:55:35.675235+00 +47 contenttypes 0002_remove_content_type_name 2024-08-02 08:55:35.691231+00 +48 auth 0002_alter_permission_name_max_length 2024-08-02 08:55:35.702962+00 +49 auth 0003_alter_user_email_max_length 2024-08-02 08:55:35.707242+00 +50 auth 0004_alter_user_username_opts 2024-08-02 08:55:35.711961+00 +51 auth 0005_alter_user_last_login_null 2024-08-02 08:55:35.716292+00 +52 auth 0006_require_contenttypes_0002 2024-08-02 08:55:35.716811+00 +53 auth 0007_alter_validators_add_error_messages 2024-08-02 08:55:35.721055+00 +54 auth 0008_alter_user_username_max_length 2024-08-02 08:55:35.725183+00 +55 auth 0009_alter_user_last_name_max_length 2024-08-02 08:55:35.729476+00 +56 auth 0010_alter_group_name_max_length 2024-08-02 08:55:35.742572+00 +57 auth 0011_update_proxy_permissions 2024-08-02 08:55:35.754766+00 +58 auth 0012_alter_user_first_name_max_length 2024-08-02 08:55:35.759474+00 +59 zerver 0051_realmalias_add_allow_subdomains 2024-08-02 08:55:35.823661+00 +60 zerver 0052_auto_fix_realmalias_realm_nullable 2024-08-02 08:55:35.838735+00 +61 zerver 0053_emailchangestatus 2024-08-02 08:55:35.855191+00 +62 zerver 0054_realm_icon 2024-08-02 08:55:35.872566+00 +63 zerver 0055_attachment_size 2024-08-02 08:55:35.885135+00 +64 zerver 0056_userprofile_emoji_alt_code 2024-08-02 08:55:35.897099+00 +65 zerver 0057_realmauditlog 2024-08-02 08:55:35.929284+00 +66 zerver 0058_realm_email_changes_disabled 2024-08-02 08:55:35.938324+00 +67 zerver 0059_userprofile_quota 2024-08-02 08:55:35.950754+00 +68 zerver 0060_move_avatars_to_be_uid_based 2024-08-02 08:55:35.951242+00 +69 zerver 0061_userprofile_timezone 2024-08-02 08:55:35.964368+00 +70 zerver 0062_default_timezone 2024-08-02 08:55:35.976446+00 +71 zerver 0063_realm_description 2024-08-02 08:55:35.985713+00 +72 zerver 0064_sync_uploads_filesize_with_db 2024-08-02 08:55:35.986196+00 +73 zerver 0065_realm_inline_image_preview 2024-08-02 08:55:35.994911+00 +74 zerver 0066_realm_inline_url_embed_preview 2024-08-02 08:55:36.003508+00 +75 zerver 0067_archived_models 2024-08-02 08:55:36.104502+00 +76 zerver 0068_remove_realm_domain 2024-08-02 08:55:36.114206+00 +77 zerver 0069_realmauditlog_extra_data 2024-08-02 08:55:36.128633+00 +78 zerver 0070_userhotspot 2024-08-02 08:55:36.206936+00 +79 zerver 0071_rename_realmalias_to_realmdomain 2024-08-02 08:55:36.2319+00 +80 zerver 0072_realmauditlog_add_index_event_time 2024-08-02 08:55:36.245993+00 +81 zerver 0073_custom_profile_fields 2024-08-02 08:55:36.30277+00 +82 zerver 0074_fix_duplicate_attachments 2024-08-02 08:55:36.319555+00 +83 zerver 0075_attachment_path_id_unique 2024-08-02 08:55:36.353558+00 +84 zerver 0076_userprofile_emojiset 2024-08-02 08:55:36.369199+00 +85 zerver 0077_add_file_name_field_to_realm_emoji 2024-08-02 08:55:36.398643+00 +86 zerver 0078_service 2024-08-02 08:55:36.41672+00 +87 zerver 0079_remove_old_scheduled_jobs 2024-08-02 08:55:36.432904+00 +88 zerver 0080_realm_description_length 2024-08-02 08:55:36.44307+00 +89 zerver 0081_make_emoji_lowercase 2024-08-02 08:55:36.473717+00 +90 zerver 0082_index_starred_user_messages 2024-08-02 08:55:36.538461+00 +91 zerver 0083_index_mentioned_user_messages 2024-08-02 08:55:36.552984+00 +92 zerver 0084_realmemoji_deactivated 2024-08-02 08:55:36.568434+00 +93 zerver 0085_fix_bots_with_none_bot_type 2024-08-02 08:55:36.58575+00 +94 zerver 0086_realm_alter_default_org_type 2024-08-02 08:55:36.595173+00 +95 zerver 0087_remove_old_scheduled_jobs 2024-08-02 08:55:36.61166+00 +96 zerver 0088_remove_referral_and_invites 2024-08-02 08:55:36.658194+00 +97 zerver 0089_auto_20170710_1353 2024-08-02 08:55:36.689117+00 +98 zerver 0090_userprofile_high_contrast_mode 2024-08-02 08:55:36.704007+00 +99 zerver 0091_realm_allow_edit_history 2024-08-02 08:55:36.714189+00 +100 zerver 0092_create_scheduledemail 2024-08-02 08:55:36.734601+00 +101 zerver 0093_subscription_event_log_backfill 2024-08-02 08:55:36.769506+00 +102 zerver 0094_realm_filter_url_validator 2024-08-02 08:55:36.770042+00 +103 zerver 0095_index_unread_user_messages 2024-08-02 08:55:36.784479+00 +104 zerver 0096_add_password_required 2024-08-02 08:55:36.799775+00 +105 zerver 0097_reactions_emoji_code 2024-08-02 08:55:36.895568+00 +106 zerver 0098_index_has_alert_word_user_messages 2024-08-02 08:55:36.910386+00 +107 zerver 0099_index_wildcard_mentioned_user_messages 2024-08-02 08:55:36.9247+00 +108 zerver 0100_usermessage_remove_is_me_message 2024-08-02 08:55:36.951748+00 +109 zerver 0101_muted_topic 2024-08-02 08:55:36.985872+00 +110 zerver 0102_convert_muted_topic 2024-08-02 08:55:37.00348+00 +111 zerver 0103_remove_userprofile_muted_topics 2024-08-02 08:55:37.019168+00 +112 zerver 0104_fix_unreads 2024-08-02 08:55:37.036049+00 +113 zerver 0105_userprofile_enable_stream_push_notifications 2024-08-02 08:55:37.052571+00 +114 zerver 0106_subscription_push_notifications 2024-08-02 08:55:37.067152+00 +115 zerver 0107_multiuseinvite 2024-08-02 08:55:37.091459+00 +116 zerver 0108_fix_default_string_id 2024-08-02 08:55:37.108872+00 +117 zerver 0109_mark_tutorial_status_finished 2024-08-02 08:55:37.126561+00 +118 zerver 0110_stream_is_in_zephyr_realm 2024-08-02 08:55:37.154565+00 +119 zerver 0111_botuserstatedata 2024-08-02 08:55:37.23988+00 +120 zerver 0112_index_muted_topics 2024-08-02 08:55:37.256367+00 +121 zerver 0113_default_stream_group 2024-08-02 08:55:37.291281+00 +122 zerver 0114_preregistrationuser_invited_as_admin 2024-08-02 08:55:37.308811+00 +123 zerver 0115_user_groups 2024-08-02 08:55:37.399667+00 +124 zerver 0116_realm_allow_message_deleting 2024-08-02 08:55:37.411053+00 +125 zerver 0117_add_desc_to_user_group 2024-08-02 08:55:37.429573+00 +126 zerver 0118_defaultstreamgroup_description 2024-08-02 08:55:37.44201+00 +127 zerver 0119_userprofile_night_mode 2024-08-02 08:55:37.460294+00 +128 zerver 0120_botuserconfigdata 2024-08-02 08:55:37.497586+00 +129 zerver 0121_realm_signup_notifications_stream 2024-08-02 08:55:37.588044+00 +130 zerver 0122_rename_botuserstatedata_botstoragedata 2024-08-02 08:55:37.623433+00 +131 zerver 0123_userprofile_make_realm_email_pair_unique 2024-08-02 08:55:37.662173+00 +132 zerver 0124_stream_enable_notifications 2024-08-02 08:55:37.696343+00 +133 confirmation 0001_initial 2024-08-02 08:55:37.717259+00 +134 confirmation 0002_realmcreationkey 2024-08-02 08:55:37.719197+00 +135 confirmation 0003_emailchangeconfirmation 2024-08-02 08:55:37.720222+00 +136 confirmation 0004_remove_confirmationmanager 2024-08-02 08:55:37.727605+00 +137 confirmation 0005_confirmation_realm 2024-08-02 08:55:37.747897+00 +138 confirmation 0006_realmcreationkey_presume_email_valid 2024-08-02 08:55:37.749709+00 +139 confirmation 0007_add_indexes 2024-08-02 08:55:37.800004+00 +140 confirmation 0008_confirmation_expiry_date 2024-08-02 08:55:37.813509+00 +141 confirmation 0009_confirmation_expiry_date_backfill 2024-08-02 08:55:37.884707+00 +142 confirmation 0010_alter_confirmation_expiry_date 2024-08-02 08:55:37.897043+00 +143 confirmation 0011_alter_confirmation_expiry_date 2024-08-02 08:55:37.910087+00 +144 confirmation 0012_alter_confirmation_id 2024-08-02 08:55:37.926546+00 +145 confirmation 0013_alter_realmcreationkey_id 2024-08-02 08:55:37.930957+00 +146 otp_static 0001_initial 2024-08-02 08:55:37.9743+00 +147 otp_static 0002_throttling 2024-08-02 08:55:38.006338+00 +148 otp_static 0003_add_timestamps 2024-08-02 08:55:38.037887+00 +149 otp_totp 0001_initial 2024-08-02 08:55:38.060239+00 +150 otp_totp 0002_auto_20190420_0723 2024-08-02 08:55:38.093206+00 +151 otp_totp 0003_add_timestamps 2024-08-02 08:55:38.125058+00 +152 phonenumber 0001_initial 2024-08-02 08:55:38.169937+00 +153 two_factor 0001_initial 2024-08-02 08:55:38.170308+00 +154 two_factor 0002_auto_20150110_0810 2024-08-02 08:55:38.170601+00 +155 two_factor 0003_auto_20150817_1733 2024-08-02 08:55:38.170946+00 +156 two_factor 0004_auto_20160205_1827 2024-08-02 08:55:38.171234+00 +157 two_factor 0005_auto_20160224_0450 2024-08-02 08:55:38.171533+00 +158 two_factor 0006_phonedevice_key_default 2024-08-02 08:55:38.171795+00 +159 two_factor 0007_auto_20201201_1019 2024-08-02 08:55:38.172041+00 +160 two_factor 0008_delete_phonedevice 2024-08-02 08:55:38.1723+00 +161 two_factor 0001_squashed_0008_delete_phonedevice 2024-08-02 08:55:38.172582+00 +162 sessions 0001_initial 2024-08-02 08:55:38.17603+00 +163 default 0001_initial 2024-08-02 08:55:38.278735+00 +164 social_auth 0001_initial 2024-08-02 08:55:38.279149+00 +165 default 0002_add_related_name 2024-08-02 08:55:38.300557+00 +166 social_auth 0002_add_related_name 2024-08-02 08:55:38.300975+00 +167 default 0003_alter_email_max_length 2024-08-02 08:55:38.303352+00 +168 social_auth 0003_alter_email_max_length 2024-08-02 08:55:38.303588+00 +169 default 0004_auto_20160423_0400 2024-08-02 08:55:38.320785+00 +170 social_auth 0004_auto_20160423_0400 2024-08-02 08:55:38.321128+00 +171 social_auth 0005_auto_20160727_2333 2024-08-02 08:55:38.323549+00 +172 social_django 0006_partial 2024-08-02 08:55:38.327297+00 +173 social_django 0007_code_timestamp 2024-08-02 08:55:38.329752+00 +174 social_django 0008_partial_timestamp 2024-08-02 08:55:38.332379+00 +175 social_django 0009_auto_20191118_0520 2024-08-02 08:55:38.366925+00 +176 social_django 0010_uid_db_index 2024-08-02 08:55:38.384933+00 +177 social_django 0011_alter_id_fields 2024-08-02 08:55:38.422339+00 +178 social_django 0012_usersocialauth_extra_data_new 2024-08-02 08:55:38.44253+00 +179 social_django 0013_migrate_extra_data 2024-08-02 08:55:38.466047+00 +180 social_django 0014_remove_usersocialauth_extra_data 2024-08-02 08:55:38.484974+00 +181 social_django 0015_rename_extra_data_new_usersocialauth_extra_data 2024-08-02 08:55:38.503697+00 +182 zerver 0125_realm_max_invites 2024-08-02 08:55:38.516248+00 +183 zerver 0126_prereg_remove_users_without_realm 2024-08-02 08:55:38.587674+00 +184 zerver 0127_disallow_chars_in_stream_and_user_name 2024-08-02 08:55:38.588412+00 +185 zerver 0128_scheduledemail_realm 2024-08-02 08:55:38.65847+00 +186 zerver 0129_remove_userprofile_autoscroll_forever 2024-08-02 08:55:38.679913+00 +187 zerver 0130_text_choice_in_emojiset 2024-08-02 08:55:38.746031+00 +188 zerver 0131_realm_create_generic_bot_by_admins_only 2024-08-02 08:55:38.758761+00 +189 zerver 0132_realm_message_visibility_limit 2024-08-02 08:55:38.771785+00 +190 zerver 0133_rename_botuserconfigdata_botconfigdata 2024-08-02 08:55:38.812434+00 +191 zerver 0134_scheduledmessage 2024-08-02 08:55:38.841502+00 +192 zerver 0135_scheduledmessage_delivery_type 2024-08-02 08:55:38.863018+00 +193 zerver 0136_remove_userprofile_quota 2024-08-02 08:55:38.937442+00 +194 zerver 0137_realm_upload_quota_gb 2024-08-02 08:55:38.951132+00 +195 zerver 0138_userprofile_realm_name_in_notifications 2024-08-02 08:55:38.973556+00 +196 zerver 0139_fill_last_message_id_in_subscription_logs 2024-08-02 08:55:38.99778+00 +197 zerver 0140_realm_send_welcome_emails 2024-08-02 08:55:39.011414+00 +198 zerver 0141_change_usergroup_description_to_textfield 2024-08-02 08:55:39.032183+00 +199 zerver 0142_userprofile_translate_emoticons 2024-08-02 08:55:39.053392+00 +200 zerver 0143_realm_bot_creation_policy 2024-08-02 08:55:39.089939+00 +201 zerver 0144_remove_realm_create_generic_bot_by_admins_only 2024-08-02 08:55:39.102872+00 +202 zerver 0145_reactions_realm_emoji_name_to_id 2024-08-02 08:55:39.126417+00 +203 zerver 0146_userprofile_message_content_in_email_notifications 2024-08-02 08:55:39.147866+00 +204 zerver 0147_realm_disallow_disposable_email_addresses 2024-08-02 08:55:39.161458+00 +205 zerver 0148_max_invites_forget_default 2024-08-02 08:55:39.187091+00 +206 zerver 0149_realm_emoji_drop_unique_constraint 2024-08-02 08:55:39.304832+00 +207 zerver 0150_realm_allow_community_topic_editing 2024-08-02 08:55:39.319254+00 +208 zerver 0151_last_reminder_default_none 2024-08-02 08:55:39.342244+00 +209 zerver 0152_realm_default_twenty_four_hour_time 2024-08-02 08:55:39.355692+00 +210 zerver 0153_remove_int_float_custom_fields 2024-08-02 08:55:39.369239+00 +211 zerver 0154_fix_invalid_bot_owner 2024-08-02 08:55:39.393021+00 +212 zerver 0155_change_default_realm_description 2024-08-02 08:55:39.407389+00 +213 zerver 0156_add_hint_to_profile_field 2024-08-02 08:55:39.421469+00 +214 zerver 0157_userprofile_is_guest 2024-08-02 08:55:39.444638+00 +215 zerver 0158_realm_video_chat_provider 2024-08-02 08:55:39.458953+00 +216 zerver 0159_realm_google_hangouts_domain 2024-08-02 08:55:39.47309+00 +217 zerver 0160_add_choice_field 2024-08-02 08:55:39.500287+00 +218 zerver 0161_realm_message_content_delete_limit_seconds 2024-08-02 08:55:39.513931+00 +219 zerver 0162_change_default_community_topic_editing 2024-08-02 08:55:39.527679+00 +220 zerver 0163_remove_userprofile_default_desktop_notifications 2024-08-02 08:55:39.60444+00 +221 zerver 0164_stream_history_public_to_subscribers 2024-08-02 08:55:39.643079+00 +222 zerver 0165_add_date_to_profile_field 2024-08-02 08:55:39.656635+00 +223 zerver 0166_add_url_to_profile_field 2024-08-02 08:55:39.670844+00 +224 zerver 0167_custom_profile_fields_sort_order 2024-08-02 08:55:39.707554+00 +225 zerver 0168_stream_is_web_public 2024-08-02 08:55:39.720872+00 +226 zerver 0169_stream_is_announcement_only 2024-08-02 08:55:39.734876+00 +227 zerver 0170_submessage 2024-08-02 08:55:39.760951+00 +228 zerver 0171_userprofile_dense_mode 2024-08-02 08:55:39.782898+00 +229 zerver 0172_add_user_type_of_custom_profile_field 2024-08-02 08:55:39.79629+00 +230 zerver 0173_support_seat_based_plans 2024-08-02 08:55:39.830879+00 +231 zerver 0174_userprofile_delivery_email 2024-08-02 08:55:39.878084+00 +232 zerver 0175_change_realm_audit_log_event_type_tense 2024-08-02 08:55:39.962845+00 +233 zerver 0176_remove_subscription_notifications 2024-08-02 08:55:39.982188+00 +234 zerver 0177_user_message_add_and_index_is_private_flag 2024-08-02 08:55:40.065476+00 +235 zerver 0178_rename_to_emails_restricted_to_domains 2024-08-02 08:55:40.079454+00 +236 zerver 0179_rename_to_digest_emails_enabled 2024-08-02 08:55:40.092858+00 +237 zerver 0180_usermessage_add_active_mobile_push_notification 2024-08-02 08:55:40.148162+00 +238 zerver 0181_userprofile_change_emojiset 2024-08-02 08:55:40.194018+00 +239 zerver 0182_set_initial_value_is_private_flag 2024-08-02 08:55:40.270239+00 +240 zerver 0183_change_custom_field_name_max_length 2024-08-02 08:55:40.287125+00 +241 zerver 0184_rename_custom_field_types 2024-08-02 08:55:40.300167+00 +242 zerver 0185_realm_plan_type 2024-08-02 08:55:40.314711+00 +243 zerver 0186_userprofile_starred_message_counts 2024-08-02 08:55:40.336842+00 +244 zerver 0187_userprofile_is_billing_admin 2024-08-02 08:55:40.359965+00 +245 zerver 0188_userprofile_enable_login_emails 2024-08-02 08:55:40.381775+00 +246 zerver 0189_userprofile_add_some_emojisets 2024-08-02 08:55:40.4283+00 +247 zerver 0190_cleanup_pushdevicetoken 2024-08-02 08:55:40.469024+00 +248 zerver 0191_realm_seat_limit 2024-08-02 08:55:40.482974+00 +249 zerver 0192_customprofilefieldvalue_rendered_value 2024-08-02 08:55:40.502036+00 +250 zerver 0193_realm_email_address_visibility 2024-08-02 08:55:40.515873+00 +251 zerver 0194_userprofile_notification_sound 2024-08-02 08:55:40.588874+00 +252 zerver 0195_realm_first_visible_message_id 2024-08-02 08:55:40.603904+00 +253 zerver 0196_add_realm_logo_fields 2024-08-02 08:55:40.632013+00 +254 zerver 0197_azure_active_directory_auth 2024-08-02 08:55:40.646505+00 +255 zerver 0198_preregistrationuser_invited_as 2024-08-02 08:55:40.692015+00 +256 zerver 0199_userstatus 2024-08-02 08:55:40.718285+00 +257 zerver 0200_remove_preregistrationuser_invited_as_admin 2024-08-02 08:55:40.740441+00 +258 zerver 0201_zoom_video_chat 2024-08-02 08:55:40.784862+00 +259 zerver 0202_add_user_status_info 2024-08-02 08:55:40.825552+00 +260 zerver 0203_realm_message_content_allowed_in_email_notifications 2024-08-02 08:55:40.839855+00 +261 zerver 0204_remove_realm_billing_fields 2024-08-02 08:55:40.86677+00 +262 zerver 0205_remove_realmauditlog_requires_billing_update 2024-08-02 08:55:40.947808+00 +263 zerver 0206_stream_rendered_description 2024-08-02 08:55:40.986468+00 +264 zerver 0207_multiuseinvite_invited_as 2024-08-02 08:55:41.009201+00 +265 zerver 0208_add_realm_night_logo_fields 2024-08-02 08:55:41.036927+00 +266 zerver 0209_stream_first_message_id 2024-08-02 08:55:41.052243+00 +267 zerver 0210_stream_first_message_id 2024-08-02 08:55:41.076747+00 +268 zerver 0211_add_users_field_to_scheduled_email 2024-08-02 08:55:41.152583+00 +269 zerver 0212_make_stream_email_token_unique 2024-08-02 08:55:41.177067+00 +270 zerver 0213_realm_digest_weekday 2024-08-02 08:55:41.191312+00 +271 zerver 0214_realm_invite_to_stream_policy 2024-08-02 08:55:41.286358+00 +272 zerver 0215_realm_avatar_changes_disabled 2024-08-02 08:55:41.302197+00 +273 zerver 0216_add_create_stream_policy 2024-08-02 08:55:41.317224+00 +274 zerver 0217_migrate_create_stream_policy 2024-08-02 08:55:41.3428+00 +275 zerver 0218_remove_create_stream_by_admins_only 2024-08-02 08:55:41.356596+00 +276 zerver 0219_toggle_realm_digest_emails_enabled_default 2024-08-02 08:55:41.394947+00 +277 zerver 0220_subscription_notification_settings 2024-08-02 08:55:41.47168+00 +278 zerver 0221_subscription_notifications_data_migration 2024-08-02 08:55:41.505122+00 +279 zerver 0222_userprofile_fluid_layout_width 2024-08-02 08:55:41.528893+00 +280 zerver 0223_rename_to_is_muted 2024-08-02 08:55:41.647017+00 +281 zerver 0224_alter_field_realm_video_chat_provider 2024-08-02 08:55:41.716519+00 +282 zerver 0225_archived_reaction_model 2024-08-02 08:55:41.767297+00 +283 zerver 0226_archived_submessage_model 2024-08-02 08:55:41.795725+00 +284 zerver 0227_inline_url_embed_preview_default_off 2024-08-02 08:55:41.836281+00 +285 zerver 0228_userprofile_demote_inactive_streams 2024-08-02 08:55:41.86062+00 +286 zerver 0229_stream_message_retention_days 2024-08-02 08:55:41.875374+00 +287 zerver 0230_rename_to_enable_stream_audible_notifications 2024-08-02 08:55:41.957202+00 +288 zerver 0231_add_archive_transaction_model 2024-08-02 08:55:42.116931+00 +289 zerver 0232_make_archive_transaction_field_not_nullable 2024-08-02 08:55:42.146041+00 +290 zerver 0233_userprofile_avatar_hash 2024-08-02 08:55:42.169671+00 +291 zerver 0234_add_external_account_custom_profile_field 2024-08-02 08:55:42.183514+00 +292 zerver 0235_userprofile_desktop_icon_count_display 2024-08-02 08:55:42.207523+00 +293 zerver 0236_remove_illegal_characters_email_full 2024-08-02 08:55:42.290042+00 +294 zerver 0237_rename_zulip_realm_to_zulipinternal 2024-08-02 08:55:42.317532+00 +295 zerver 0238_usermessage_bigint_id 2024-08-02 08:55:42.35974+00 +296 zerver 0239_usermessage_copy_id_to_bigint_id 2024-08-02 08:55:42.388148+00 +297 zerver 0240_usermessage_migrate_bigint_id_into_id 2024-08-02 08:55:42.429104+00 +298 zerver 0241_usermessage_bigint_id_migration_finalize 2024-08-02 08:55:42.474511+00 +299 zerver 0242_fix_bot_email_property 2024-08-02 08:55:42.500873+00 +300 zerver 0243_message_add_date_sent_column 2024-08-02 08:55:42.541468+00 +301 zerver 0244_message_copy_pub_date_to_date_sent 2024-08-02 08:55:42.666816+00 +302 zerver 0245_message_date_sent_finalize_part1 2024-08-02 08:55:42.716713+00 +303 zerver 0246_message_date_sent_finalize_part2 2024-08-02 08:55:42.807257+00 +304 zerver 0247_realmauditlog_event_type_to_int 2024-08-02 08:55:43.004428+00 +305 zerver 0248_userprofile_role_start 2024-08-02 08:55:43.055246+00 +306 zerver 0249_userprofile_role_finish 2024-08-02 08:55:43.128709+00 +307 zerver 0250_saml_auth 2024-08-02 08:55:43.14366+00 +308 zerver 0251_prereg_user_add_full_name 2024-08-02 08:55:43.189913+00 +309 zerver 0252_realm_user_group_edit_policy 2024-08-02 08:55:43.20509+00 +310 zerver 0253_userprofile_wildcard_mentions_notify 2024-08-02 08:55:43.302663+00 +311 zerver 0209_user_profile_no_empty_password 2024-08-02 08:55:43.330158+00 +312 zerver 0254_merge_0209_0253 2024-08-02 08:55:43.330764+00 +313 zerver 0255_userprofile_stream_add_recipient_column 2024-08-02 08:55:43.382592+00 +314 zerver 0256_userprofile_stream_set_recipient_column_values 2024-08-02 08:55:43.384448+00 +315 zerver 0257_fix_has_link_attribute 2024-08-02 08:55:43.410533+00 +316 zerver 0258_enable_online_push_notifications_default 2024-08-02 08:55:43.435751+00 +317 zerver 0259_missedmessageemailaddress 2024-08-02 08:55:43.466275+00 +318 zerver 0260_missed_message_addresses_from_redis_to_db 2024-08-02 08:55:43.493714+00 +319 zerver 0261_realm_private_message_policy 2024-08-02 08:55:43.50916+00 +320 zerver 0262_mutedtopic_date_muted 2024-08-02 08:55:43.531892+00 +321 zerver 0263_stream_stream_post_policy 2024-08-02 08:55:43.549086+00 +322 zerver 0264_migrate_is_announcement_only 2024-08-02 08:55:43.631071+00 +323 zerver 0265_remove_stream_is_announcement_only 2024-08-02 08:55:43.648643+00 +324 zerver 0266_userpresence_realm 2024-08-02 08:55:43.676344+00 +325 zerver 0267_backfill_userpresence_realm_id 2024-08-02 08:55:43.677738+00 +326 zerver 0268_add_userpresence_realm_timestamp_index 2024-08-02 08:55:43.72906+00 +327 zerver 0269_gitlab_auth 2024-08-02 08:55:43.744533+00 +328 zerver 0270_huddle_recipient 2024-08-02 08:55:43.770947+00 +329 zerver 0271_huddle_set_recipient_column_values 2024-08-02 08:55:43.772161+00 +330 zerver 0272_realm_default_code_block_language 2024-08-02 08:55:43.787983+00 +331 zerver 0273_migrate_old_bot_messages 2024-08-02 08:55:43.815305+00 +332 zerver 0274_nullbooleanfield_to_booleanfield 2024-08-02 08:55:44.050179+00 +333 zerver 0275_remove_userprofile_last_pointer_updater 2024-08-02 08:55:44.076107+00 +334 zerver 0276_alertword 2024-08-02 08:55:44.106966+00 +335 zerver 0277_migrate_alert_word 2024-08-02 08:55:44.13432+00 +336 zerver 0278_remove_userprofile_alert_words 2024-08-02 08:55:44.159185+00 +337 zerver 0279_message_recipient_subject_indexes 2024-08-02 08:55:44.204802+00 +338 zerver 0280_userprofile_presence_enabled 2024-08-02 08:55:44.281413+00 +339 zerver 0281_zoom_oauth 2024-08-02 08:55:44.30768+00 +340 zerver 0282_remove_zoom_video_chat 2024-08-02 08:55:44.353117+00 +341 zerver 0283_apple_auth 2024-08-02 08:55:44.368818+00 +342 zerver 0284_convert_realm_admins_to_realm_owners 2024-08-02 08:55:44.396468+00 +343 zerver 0285_remove_realm_google_hangouts_domain 2024-08-02 08:55:44.437884+00 +344 zerver 0261_pregistrationuser_clear_invited_as_admin 2024-08-02 08:55:44.464327+00 +345 zerver 0286_merge_0260_0285 2024-08-02 08:55:44.464865+00 +346 zerver 0287_clear_duplicate_reactions 2024-08-02 08:55:44.492268+00 +347 zerver 0288_reaction_unique_on_emoji_code 2024-08-02 08:55:44.535972+00 +348 zerver 0289_tighten_attachment_size 2024-08-02 08:55:44.640413+00 +349 zerver 0290_remove_night_mode_add_color_scheme 2024-08-02 08:55:44.718998+00 +350 zerver 0291_realm_retention_days_not_null 2024-08-02 08:55:44.73554+00 +351 zerver 0292_update_default_value_of_invited_as 2024-08-02 08:55:44.785128+00 +352 zerver 0293_update_invite_as_dict_values 2024-08-02 08:55:44.813682+00 +353 zerver 0294_remove_userprofile_pointer 2024-08-02 08:55:44.838696+00 +354 zerver 0295_case_insensitive_email_indexes 2024-08-02 08:55:44.867423+00 +355 zerver 0296_remove_userprofile_short_name 2024-08-02 08:55:44.893024+00 +356 zerver 0297_draft 2024-08-02 08:55:44.984458+00 +357 zerver 0298_fix_realmauditlog_format 2024-08-02 08:55:45.012372+00 +358 zerver 0299_subscription_role 2024-08-02 08:55:45.035895+00 +359 zerver 0300_add_attachment_is_web_public 2024-08-02 08:55:45.085767+00 +360 zerver 0301_fix_unread_messages_in_deactivated_streams 2024-08-02 08:55:45.087435+00 +361 zerver 0302_case_insensitive_stream_name_index 2024-08-02 08:55:45.107467+00 +362 zerver 0303_realm_wildcard_mention_policy 2024-08-02 08:55:45.124527+00 +363 zerver 0304_remove_default_status_of_default_private_streams 2024-08-02 08:55:45.152699+00 +364 zerver 0305_realm_deactivated_redirect 2024-08-02 08:55:45.168615+00 +365 zerver 0306_custom_profile_field_date_format 2024-08-02 08:55:45.170141+00 +366 zerver 0307_rename_api_super_user_to_can_forge_sender 2024-08-02 08:55:45.197532+00 +367 zerver 0308_remove_reduntant_realm_meta_permissions 2024-08-02 08:55:45.213021+00 +368 zerver 0309_userprofile_can_create_users 2024-08-02 08:55:45.23981+00 +369 zerver 0310_jsonfield 2024-08-02 08:55:45.240249+00 +370 zerver 0311_userprofile_default_view 2024-08-02 08:55:45.266319+00 +371 zerver 0312_subscription_is_user_active 2024-08-02 08:55:45.288679+00 +372 zerver 0313_finish_is_user_active_migration 2024-08-02 08:55:45.430227+00 +373 zerver 0314_muted_user 2024-08-02 08:55:45.460872+00 +374 zerver 0315_realmplayground 2024-08-02 08:55:45.492642+00 +375 zerver 0316_realm_invite_to_realm_policy 2024-08-02 08:55:45.509646+00 +376 zerver 0317_migrate_to_invite_to_realm_policy 2024-08-02 08:55:45.537667+00 +377 zerver 0318_remove_realm_invite_by_admins_only 2024-08-02 08:55:45.553575+00 +378 zerver 0319_realm_giphy_rating 2024-08-02 08:55:45.570295+00 +379 zerver 0320_realm_move_messages_between_streams_policy 2024-08-02 08:55:45.586963+00 +380 zerver 0321_userprofile_enable_marketing_emails 2024-08-02 08:55:45.613224+00 +381 zerver 0322_realm_create_audit_log_backfill 2024-08-02 08:55:45.641103+00 +382 zerver 0323_show_starred_message_counts 2024-08-02 08:55:45.75274+00 +383 zerver 0324_fix_deletion_cascade_behavior 2024-08-02 08:55:45.864208+00 +384 zerver 0325_alter_realmplayground_unique_together 2024-08-02 08:55:45.882397+00 +385 zerver 0359_re2_linkifiers 2024-08-02 08:55:45.912076+00 +386 zerver 0326_alter_realm_authentication_methods 2024-08-02 08:55:45.92863+00 +387 zerver 0327_realm_edit_topic_policy 2024-08-02 08:55:45.945113+00 +388 zerver 0328_migrate_to_edit_topic_policy 2024-08-02 08:55:45.97364+00 +389 zerver 0329_remove_realm_allow_community_topic_editing 2024-08-02 08:55:45.989614+00 +390 zerver 0330_linkifier_pattern_validator 2024-08-02 08:55:46.061831+00 +391 zerver 0331_scheduledmessagenotificationemail 2024-08-02 08:55:46.098818+00 +392 zerver 0332_realmuserdefault 2024-08-02 08:55:46.130291+00 +393 zerver 0333_alter_realm_org_type 2024-08-02 08:55:46.174686+00 +394 zerver 0334_email_notifications_batching_period 2024-08-02 08:55:46.218066+00 +395 zerver 0335_add_draft_sync_field 2024-08-02 08:55:46.261408+00 +396 zerver 0336_userstatus_status_emoji 2024-08-02 08:55:46.385899+00 +397 zerver 0337_realm_add_custom_emoji_policy 2024-08-02 08:55:46.404761+00 +398 zerver 0338_migrate_to_add_custom_emoji_policy 2024-08-02 08:55:46.435271+00 +399 zerver 0339_remove_realm_add_emoji_by_admins_only 2024-08-02 08:55:46.453061+00 +400 zerver 0340_rename_mutedtopic_to_usertopic 2024-08-02 08:55:46.530041+00 +401 zerver 0341_usergroup_is_system_group 2024-08-02 08:55:46.557303+00 +402 zerver 0342_realm_demo_organization_scheduled_deletion_date 2024-08-02 08:55:46.573822+00 +403 zerver 0343_alter_useractivityinterval_index_together 2024-08-02 08:55:46.597337+00 +404 zerver 0344_alter_emojiset_default_value 2024-08-02 08:55:46.641783+00 +405 zerver 0345_alter_realm_name 2024-08-02 08:55:46.746758+00 +406 zerver 0346_create_realm_user_default_table 2024-08-02 08:55:46.776912+00 +407 zerver 0347_realm_emoji_animated 2024-08-02 08:55:46.804314+00 +408 zerver 0348_rename_date_muted_usertopic_last_updated 2024-08-02 08:55:46.829558+00 +409 zerver 0349_alter_usertopic_table 2024-08-02 08:55:46.853814+00 +410 zerver 0350_usertopic_visibility_policy 2024-08-02 08:55:46.87826+00 +411 zerver 0351_user_topic_visibility_indexes 2024-08-02 08:55:46.926788+00 +412 zerver 0352_migrate_twenty_four_hour_time_to_realmuserdefault 2024-08-02 08:55:46.956829+00 +413 zerver 0353_remove_realm_default_twenty_four_hour_time 2024-08-02 08:55:46.973278+00 +414 zerver 0354_alter_realm_message_content_delete_limit_seconds 2024-08-02 08:55:47.090417+00 +415 zerver 0355_realm_delete_own_message_policy 2024-08-02 08:55:47.108635+00 +416 zerver 0356_migrate_to_delete_own_message_policy 2024-08-02 08:55:47.142067+00 +417 zerver 0357_remove_realm_allow_message_deleting 2024-08-02 08:55:47.160804+00 +418 zerver 0358_split_create_stream_policy 2024-08-02 08:55:47.243984+00 +419 zerver 0360_merge_0358_0359 2024-08-02 08:55:47.244496+00 +420 zerver 0361_realm_create_web_public_stream_policy 2024-08-02 08:55:47.26214+00 +421 zerver 0362_send_typing_notifications_user_setting 2024-08-02 08:55:47.408559+00 +422 zerver 0363_send_read_receipts_user_setting 2024-08-02 08:55:47.453151+00 +423 zerver 0364_rename_members_usergroup_direct_members 2024-08-02 08:55:47.480244+00 +424 zerver 0365_alter_user_group_related_fields 2024-08-02 08:55:47.5633+00 +425 zerver 0366_group_group_membership 2024-08-02 08:55:47.629545+00 +426 zerver 0367_scimclient 2024-08-02 08:55:47.661218+00 +427 zerver 0368_alter_realmfilter_url_format_string 2024-08-02 08:55:47.661744+00 +428 zerver 0369_add_escnav_default_display_user_setting 2024-08-02 08:55:47.768212+00 +429 zerver 0370_realm_enable_spectator_access 2024-08-02 08:55:47.785693+00 +430 zerver 0371_invalid_characters_in_topics 2024-08-02 08:55:47.815993+00 +431 zerver 0372_realmemoji_unique_realm_emoji_when_false_deactivated 2024-08-02 08:55:47.843916+00 +432 zerver 0373_fix_deleteduser_dummies 2024-08-02 08:55:47.876275+00 +433 zerver 0374_backfill_user_delete_realmauditlog 2024-08-02 08:55:47.906531+00 +434 zerver 0375_invalid_characters_in_stream_names 2024-08-02 08:55:47.936201+00 +435 zerver 0376_set_realmemoji_author_and_reupload_realmemoji 2024-08-02 08:55:47.966892+00 +436 zerver 0377_message_edit_history_format 2024-08-02 08:55:48.046039+00 +437 zerver 0378_alter_realmuserdefault_realm 2024-08-02 08:55:48.081322+00 +438 zerver 0379_userprofile_uuid 2024-08-02 08:55:48.110729+00 +439 zerver 0380_userprofile_uuid_backfill 2024-08-02 08:55:48.141691+00 +440 zerver 0381_alter_userprofile_uuid 2024-08-02 08:55:48.173137+00 +441 zerver 0382_create_role_based_system_groups 2024-08-02 08:55:48.203456+00 +442 zerver 0383_revoke_invitations_from_deactivated_users 2024-08-02 08:55:48.233329+00 +443 zerver 0384_alter_realm_not_null 2024-08-02 08:55:48.295488+00 +444 zerver 0385_attachment_flags_cache 2024-08-02 08:55:48.465033+00 +445 zerver 0386_fix_attachment_caches 2024-08-02 08:55:48.524748+00 +446 zerver 0387_reupload_realmemoji_again 2024-08-02 08:55:48.555364+00 +447 zerver 0388_preregistrationuser_created_user 2024-08-02 08:55:48.586435+00 +448 zerver 0389_userprofile_display_emoji_reaction_users 2024-08-02 08:55:48.630702+00 +449 zerver 0390_fix_stream_history_public_to_subscribers 2024-08-02 08:55:48.711934+00 +450 zerver 0391_alter_stream_history_public_to_subscribers 2024-08-02 08:55:48.74161+00 +451 zerver 0392_non_nullable_fields 2024-08-02 08:55:48.874941+00 +452 zerver 0393_realm_want_advertise_in_communities_directory 2024-08-02 08:55:48.892859+00 +453 zerver 0394_alter_realm_want_advertise_in_communities_directory 2024-08-02 08:55:48.911394+00 +454 zerver 0395_alter_realm_wildcard_mention_policy 2024-08-02 08:55:49.011609+00 +455 zerver 0396_remove_subscription_role 2024-08-02 08:55:49.036108+00 +456 zerver 0397_remove_custom_field_values_for_deleted_options 2024-08-02 08:55:49.067038+00 +457 zerver 0398_tsvector_statistics 2024-08-02 08:55:49.069316+00 +458 zerver 0399_preregistrationuser_multiuse_invite 2024-08-02 08:55:49.100369+00 +459 zerver 0400_realmreactivationstatus 2024-08-02 08:55:49.132089+00 +460 zerver 0401_migrate_old_realm_reactivation_links 2024-08-02 08:55:49.162872+00 +461 zerver 0402_alter_usertopic_visibility_policy 2024-08-02 08:55:49.187483+00 +462 zerver 0403_create_role_based_groups_for_internal_realms 2024-08-02 08:55:49.218531+00 +463 zerver 0404_realm_enable_read_receipts 2024-08-02 08:55:49.236631+00 +464 zerver 0405_set_default_for_enable_read_receipts 2024-08-02 08:55:49.319992+00 +465 zerver 0406_alter_realm_message_content_edit_limit_seconds 2024-08-02 08:55:49.388237+00 +466 zerver 0407_userprofile_user_list_style 2024-08-02 08:55:49.434917+00 +467 zerver 0408_stream_can_remove_subscribers_group 2024-08-02 08:55:49.466226+00 +468 zerver 0409_set_default_for_can_remove_subscribers_group 2024-08-02 08:55:49.49725+00 +469 zerver 0410_alter_stream_can_remove_subscribers_group 2024-08-02 08:55:49.529622+00 +470 zerver 0411_alter_muteduser_muted_user_and_more 2024-08-02 08:55:49.587681+00 +471 zerver 0412_customprofilefield_display_in_profile_summary 2024-08-02 08:55:49.660959+00 +472 zerver 0413_set_presence_enabled_false_for_user_status_away 2024-08-02 08:55:49.693411+00 +473 zerver 0414_remove_userstatus_status 2024-08-02 08:55:49.717037+00 +474 zerver 0415_delete_scimclient 2024-08-02 08:55:49.71924+00 +475 zerver 0416_set_default_emoji_style 2024-08-02 08:55:49.750732+00 +476 zerver 0417_alter_customprofilefield_field_type 2024-08-02 08:55:49.768135+00 +477 zerver 0418_archivedmessage_realm_message_realm 2024-08-02 08:55:49.830564+00 +478 zerver 0419_backfill_message_realm 2024-08-02 08:55:49.86502+00 +479 zerver 0420_alter_archivedmessage_realm_alter_message_realm 2024-08-02 08:55:49.981675+00 +480 zerver 0421_migrate_pronouns_custom_profile_fields 2024-08-02 08:55:50.013334+00 +481 zerver 0422_multiuseinvite_status 2024-08-02 08:55:50.042178+00 +482 zerver 0423_fix_email_gateway_attachment_owner 2024-08-02 08:55:50.072988+00 +483 zerver 0424_realm_move_messages_within_stream_limit_seconds 2024-08-02 08:55:50.092877+00 +484 zerver 0425_realm_move_messages_between_streams_limit_seconds 2024-08-02 08:55:50.112534+00 +485 zerver 0426_add_email_address_visibility_setting 2024-08-02 08:55:50.159361+00 +486 zerver 0427_migrate_to_user_level_email_address_visibility_setting 2024-08-02 08:55:50.190788+00 +487 zerver 0428_remove_realm_email_address_visibility 2024-08-02 08:55:50.210343+00 +488 zerver 0429_user_topic_case_insensitive_unique_toghether 2024-08-02 08:55:50.315954+00 +489 zerver 0430_fix_audit_log_objects_for_group_based_stream_settings 2024-08-02 08:55:50.347392+00 +490 zerver 0431_alter_archivedreaction_unique_together_and_more 2024-08-02 08:55:50.396841+00 +491 zerver 0432_alter_and_migrate_realm_name_in_notifications 2024-08-02 08:55:50.548119+00 +492 zerver 0433_preregistrationrealm 2024-08-02 08:55:50.643519+00 +493 zerver 0434_create_nobody_system_group 2024-08-02 08:55:50.675124+00 +494 zerver 0435_scheduledmessage_rendered_content 2024-08-02 08:55:50.704619+00 +495 zerver 0436_realmauthenticationmethods 2024-08-02 08:55:50.770681+00 +496 zerver 0437_remove_realm_authentication_methods 2024-08-02 08:55:50.790958+00 +497 zerver 0438_add_web_mark_read_on_scroll_policy_setting 2024-08-02 08:55:50.839328+00 +498 zerver 0439_fix_deleteduser_email 2024-08-02 08:55:50.871192+00 +499 zerver 0440_realmfilter_url_template 2024-08-02 08:55:50.909308+00 +500 zerver 0441_backfill_realmfilter_url_template 2024-08-02 08:55:50.94068+00 +501 zerver 0442_remove_realmfilter_url_format_string 2024-08-02 08:55:51.05037+00 +502 zerver 0443_userpresence_new_table_schema 2024-08-02 08:55:51.233398+00 +503 zerver 0444_userpresence_fill_data 2024-08-02 08:55:51.265359+00 +504 zerver 0445_drop_userpresenceold 2024-08-02 08:55:51.268225+00 +505 zerver 0446_realmauditlog_zerver_realmauditlog_user_subscriptions_idx 2024-08-02 08:55:51.297874+00 +506 zerver 0447_attachment_scheduled_messages_and_more 2024-08-02 08:55:51.423533+00 +507 zerver 0448_scheduledmessage_new_fields 2024-08-02 08:55:51.513647+00 +508 zerver 0449_scheduledmessage_zerver_unsent_scheduled_messages_indexes 2024-08-02 08:55:51.572194+00 +509 zerver 0450_backfill_subscription_auditlogs 2024-08-02 08:55:51.604083+00 +510 zerver 0451_add_userprofile_api_key_index 2024-08-02 08:55:51.637702+00 +511 zerver 0452_realmauditlog_extra_data_json 2024-08-02 08:55:51.724949+00 +512 zerver 0453_followed_topic_notifications 2024-08-02 08:55:51.968438+00 +513 zerver 0454_usergroup_can_mention_group 2024-08-02 08:55:52.054113+00 +514 zerver 0455_set_default_for_can_mention_group 2024-08-02 08:55:52.087151+00 +515 zerver 0456_alter_usergroup_can_mention_group 2024-08-02 08:55:52.121203+00 +516 zerver 0457_backfill_scheduledmessagenotificationemail_trigger 2024-08-02 08:55:52.123135+00 +517 zerver 0458_realmauditlog_modified_user_group 2024-08-02 08:55:52.156084+00 +518 zerver 0459_remove_invalid_characters_from_user_group_name 2024-08-02 08:55:52.189962+00 +519 zerver 0460_backfill_realmauditlog_extradata_to_json_field 2024-08-02 08:55:52.222589+00 +520 zerver 0461_alter_realm_default_code_block_language 2024-08-02 08:55:52.296605+00 +521 zerver 0462_realmplayground_url_template 2024-08-02 08:55:52.375416+00 +522 zerver 0463_backfill_realmplayground_url_template 2024-08-02 08:55:52.408662+00 +523 zerver 0464_remove_realmplayground_url_prefix 2024-08-02 08:55:52.449963+00 +524 zerver 0465_backfill_scheduledmessagenotificationemail_trigger 2024-08-02 08:55:52.451251+00 +525 zerver 0466_realmfilter_order 2024-08-02 08:55:52.502609+00 +526 zerver 0467_rename_extradata_realmauditlog_extra_data_json 2024-08-02 08:55:52.561743+00 +527 zerver 0468_rename_followup_day_email_templates 2024-08-02 08:55:52.596309+00 +528 zerver 0469_realm_create_multiuse_invite_group 2024-08-02 08:55:52.629896+00 +529 zerver 0470_set_default_value_for_create_multiuse_invite_group 2024-08-02 08:55:52.716906+00 +530 zerver 0471_alter_realm_create_multiuse_invite_group 2024-08-02 08:55:52.751842+00 +531 zerver 0472_add_message_realm_id_indexes 2024-08-02 08:55:53.088097+00 +532 zerver 0473_remove_message_non_realm_id_indexes 2024-08-02 08:55:53.208923+00 +533 zerver 0474_realmuserdefault_web_stream_unreads_count_display_policy_and_more 2024-08-02 08:55:53.259632+00 +534 zerver 0475_realm_jitsi_server_url 2024-08-02 08:55:53.335217+00 +535 zerver 0476_realmuserdefault_automatically_follow_topics_policy_and_more 2024-08-02 08:55:53.436828+00 +536 zerver 0477_alter_realmuserdefault_automatically_follow_topics_policy_and_more 2024-08-02 08:55:53.437508+00 +537 zerver 0478_realm_enable_guest_user_indicator 2024-08-02 08:55:53.461106+00 +538 zerver 0479_realm_uuid_realm_uuid_owner_secret 2024-08-02 08:55:53.506706+00 +539 zerver 0480_realm_backfill_uuid_and_secret 2024-08-02 08:55:53.53947+00 +540 zerver 0481_alter_realm_uuid_alter_realm_uuid_owner_secret 2024-08-02 08:55:53.585631+00 +541 zerver 0482_automatically_follow_unmute_topics_policy_defaults 2024-08-02 08:55:53.790616+00 +542 zerver 0483_rename_escape_navigates_to_default_view_realmuserdefault_web_escape_navigates_to_home_view_and_more 2024-08-02 08:55:53.89792+00 +543 zerver 0484_preregistrationrealm_default_language 2024-08-02 08:55:53.928438+00 +544 zerver 0485_alter_usermessage_flags_and_add_index 2024-08-02 08:55:54.074197+00 +545 zerver 0486_clear_old_data_for_unused_usermessage_flags 2024-08-02 08:55:54.163007+00 +546 zerver 0487_realm_can_access_all_users_group 2024-08-02 08:55:54.198715+00 +547 zerver 0488_set_default_value_for_can_access_all_users_group 2024-08-02 08:55:54.233595+00 +548 zerver 0489_alter_realm_can_access_all_users_group 2024-08-02 08:55:54.270358+00 +549 zerver 0490_renumber_options_desktop_icon_count_display 2024-08-02 08:55:54.305191+00 +550 zerver 0491_alter_realmuserdefault_web_home_view_and_more 2024-08-02 08:55:54.418904+00 +551 zerver 0492_realm_push_notifications_enabled_and_more 2024-08-02 08:55:54.465037+00 +552 zerver 0493_rename_userhotspot_to_onboardingstep 2024-08-02 08:55:54.571677+00 +553 zerver 0494_realmuserdefault_automatically_follow_topics_where_mentioned_and_more 2024-08-02 08:55:54.62286+00 +554 zerver 0495_scheduledmessage_read_by_sender 2024-08-02 08:55:54.654+00 +555 zerver 0496_alter_scheduledmessage_read_by_sender 2024-08-02 08:55:54.775122+00 +556 zerver 0501_delete_dangling_usermessages 2024-08-02 08:55:54.813426+00 +557 zerver 0517_resort_edit_history 2024-08-02 08:55:54.813947+00 +558 zerver 0497_resort_edit_history 2024-08-02 08:55:54.815513+00 +559 zerver 0498_rename_notifications_stream_realm_new_stream_announcements_stream 2024-08-02 08:55:54.843298+00 +560 zerver 0499_rename_signup_notifications_stream_realm_signup_announcements_stream 2024-08-02 08:55:54.869479+00 +561 zerver 0500_realm_zulip_update_announcements_stream 2024-08-02 08:55:54.937192+00 +562 zerver 0501_mark_introduce_zulip_view_modals_as_read 2024-08-02 08:55:54.970623+00 +563 zerver 0502_merge_20240319_2236 2024-08-02 08:55:54.971234+00 +564 zerver 0503_realm_zulip_update_announcements_level 2024-08-02 08:55:54.994303+00 +565 zerver 0504_customprofilefield_required 2024-08-02 08:55:55.015447+00 +566 zerver 0505_realmuserdefault_web_font_size_px_and_more 2024-08-02 08:55:55.186943+00 +567 zerver 0506_realm_require_unique_names 2024-08-02 08:55:55.210167+00 +568 zerver 0507_rework_realm_upload_quota_gb 2024-08-02 08:55:55.254198+00 +569 zerver 0508_realmuserdefault_receives_typing_notifications_and_more 2024-08-02 08:55:55.305303+00 +570 zerver 0509_fix_emoji_metadata 2024-08-02 08:55:55.337952+00 +571 zerver 0510_add_realmauditlog_realm_event_type_index 2024-08-02 08:55:55.36921+00 +572 zerver 0511_stream_creator 2024-08-02 08:55:55.49356+00 +573 zerver 0512_namedusergroup 2024-08-02 08:55:55.531509+00 +574 zerver 0513_copy_groups_data_to_named_user_group 2024-08-02 08:55:55.564435+00 +575 zerver 0514_update_usergroup_foreign_keys_to_namedusergroup 2024-08-02 08:55:55.700788+00 +576 zerver 0515_rename_named_group_can_mention_group_namedusergroup_can_mention_group_and_more 2024-08-02 08:55:56.08089+00 +577 zerver 0516_fix_confirmation_preregistrationusers 2024-08-02 08:55:56.086037+00 +578 zerver 0518_merge 2024-08-02 08:55:56.086546+00 +579 zerver 0519_archivetransaction_restored_timestamp 2024-08-02 08:55:56.109143+00 +580 zerver 0520_attachment_zerver_attachment_realm_create_time 2024-08-02 08:55:56.193754+00 +581 zerver 0521_multiuseinvite_include_realm_default_subscriptions_and_more 2024-08-02 08:55:56.254188+00 +582 zerver 0522_set_include_realm_default_subscriptions_for_existing_objects 2024-08-02 08:55:56.320507+00 +583 zerver 0523_alter_multiuseinvite_subscribe_to_default_streams_and_more 2024-08-02 08:55:56.381934+00 +584 zerver 0524_remove_userprofile_onboarding_steps 2024-08-02 08:55:56.413382+00 +585 zerver 0525_userpresence_last_update_id 2024-08-02 08:55:56.530203+00 +586 zerver 0526_user_presence_backfill_last_update_id_to_0 2024-08-02 08:55:56.626357+00 +587 zerver 0527_presencesequence 2024-08-02 08:55:56.694444+00 +588 zerver 0528_realmauditlog_zerver_realmauditlog_user_activations_idx 2024-08-02 08:55:56.726861+00 +589 zerver 0529_fts_bigint_id 2024-08-02 08:55:56.729666+00 +590 zerver 0530_alter_useractivity_id_alter_useractivityinterval_id 2024-08-02 08:55:56.850594+00 +591 zerver 0531_convert_most_ids_to_bigints 2024-08-02 08:55:58.713078+00 +592 zerver 0532_realm_can_create_public_channel_group 2024-08-02 08:55:58.74731+00 +593 zerver 0533_set_can_create_public_channel_group 2024-08-02 08:55:58.783543+00 +594 zerver 0534_alter_realm_can_create_public_channel_group 2024-08-02 08:55:58.820371+00 +595 zerver 0535_remove_realm_create_public_stream_policy 2024-08-02 08:55:58.843444+00 +596 zerver 0536_add_message_type 2024-08-02 08:55:58.962765+00 +597 zerver 0537_realm_can_create_private_channel_group 2024-08-02 08:55:58.998461+00 +598 zerver 0538_set_can_create_private_channel_group 2024-08-02 08:55:59.036248+00 +599 zerver 0539_alter_realm_can_create_private_channel_group 2024-08-02 08:55:59.072836+00 +600 zerver 0540_remove_realm_create_private_stream_policy 2024-08-02 08:55:59.095947+00 +601 zerver 0541_alter_realmauditlog_options 2024-08-02 08:55:59.127801+00 +602 zerver 0542_onboardingusermessage 2024-08-02 08:55:59.165882+00 +603 zerver 0543_preregistrationuser_notify_referrer_on_join 2024-08-02 08:55:59.197443+00 +604 zerver 0544_copy_avatar_images 2024-08-02 08:55:59.289611+00 +605 zerver 0545_attachment_content_type 2024-08-02 08:55:59.355599+00 +606 zerver 0546_rename_huddle_directmessagegroup_and_more 2024-08-02 08:55:59.373718+00 +607 zerver 0547_realmuserdefault_web_navigate_to_sent_message_and_more 2024-08-02 08:55:59.428328+00 +608 zerver 0548_realmuserdefault_web_channel_default_view_and_more 2024-08-02 08:55:59.48203+00 +609 zerver 0549_realm_direct_message_initiator_group_and_more 2024-08-02 08:55:59.55037+00 +610 zerver 0550_set_default_value_for_realm_direct_message_initiator_group_and_more 2024-08-02 08:55:59.643591+00 +611 zerver 0551_alter_realm_direct_message_initiator_group_and_more 2024-08-02 08:55:59.719042+00 +612 zerver 0552_remove_realm_private_message_policy 2024-08-02 08:55:59.743275+00 +613 zerver 0553_copy_emoji_images 2024-08-02 08:55:59.781472+00 +614 zerver 0554_imageattachment 2024-08-02 08:55:59.81793+00 +615 zerver 0555_alter_onboardingstep_onboarding_step 2024-08-02 08:55:59.844729+00 +616 zerver 0556_alter_realmuserdefault_dense_mode_and_more 2024-08-02 08:56:00.066777+00 +617 zerver 0557_change_information_density_defaults 2024-08-02 08:56:00.102429+00 +618 zerver 0558_realmuserdefault_web_animate_image_previews_and_more 2024-08-02 08:56:00.156834+00 +619 social_django 0002_add_related_name 2024-08-02 08:56:00.160331+00 +620 social_django 0001_initial 2024-08-02 08:56:00.160677+00 +621 social_django 0004_auto_20160423_0400 2024-08-02 08:56:00.161005+00 +622 social_django 0005_auto_20160727_2333 2024-08-02 08:56:00.161355+00 +623 social_django 0003_alter_email_max_length 2024-08-02 08:56:00.161653+00 +624 phonenumber 0001_squashed_0001_initial 2024-08-02 08:56:00.161968+00 \. @@ -5204,7 +4249,7 @@ COPY zulip.django_migrations (id, app, name, applied) FROM stdin; -- COPY zulip.django_session (session_key, session_data, expire_date) FROM stdin; -0w669y0rlizhj4xlch9ydfg9rkpaqx2f .eJxVjEEOgjAQRe_StSGMnaHg0ngKN02nnaaoKKF0oca7CwkL3b73338r68qcbMky2T6og2rV7pex81e5r-I1To-L-LnaUK7O5daPpzIMz-O2-kuTy2k9NARBEOvgllIaA9FHpNZ4oKjrSISadceeURgcN_sAnUSUBQG1Wn2-trU2ww:1niBTj:aTHXPb2BqNSd82N-gkqCMwyjb3SDaEaanoeIDc7VbT4 2022-05-07 08:50:55.845995+00 +is9enavulv22icsccfjejx4rqytiizrx .eJxVi0sOwiAQQO_C2jRQpjC4NJ7CDeEzhKq1TSkLbXp3NelCt--zMuvqkm0tNNs-siNDdvhl3oUbPb7iNc3jlcLS7Kg0l3rvp3Mdhudpr_7W7Er-fNGT5AITSlASRWxNEgG8lgY4GO50UtQhJxGS71qldXCea6EQAMhQYtsbh101hg:1sZo9D:r067zPnC7_pHfby1kZXvmJDt8Al1F0uzye5n5U2kWGw 2024-08-16 09:00:27.916837+00 \. @@ -5220,7 +4265,7 @@ COPY zulip.fts_update_log (id, message_id) FROM stdin; -- Data for Name: otp_static_staticdevice; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.otp_static_staticdevice (id, name, confirmed, user_id, throttling_failure_count, throttling_failure_timestamp) FROM stdin; +COPY zulip.otp_static_staticdevice (id, name, confirmed, user_id, throttling_failure_count, throttling_failure_timestamp, created_at, last_used_at) FROM stdin; \. @@ -5236,7 +4281,7 @@ COPY zulip.otp_static_statictoken (id, token, device_id) FROM stdin; -- Data for Name: otp_totp_totpdevice; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.otp_totp_totpdevice (id, name, confirmed, key, step, t0, digits, tolerance, drift, last_t, user_id, throttling_failure_count, throttling_failure_timestamp) FROM stdin; +COPY zulip.otp_totp_totpdevice (id, name, confirmed, key, step, t0, digits, tolerance, drift, last_t, user_id, throttling_failure_count, throttling_failure_timestamp, created_at, last_used_at) FROM stdin; \. @@ -5292,7 +4337,7 @@ COPY zulip.third_party_api_results (cache_key, value, expires) FROM stdin; -- Data for Name: two_factor_phonedevice; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.two_factor_phonedevice (id, name, confirmed, number, key, method, user_id, throttling_failure_count, throttling_failure_timestamp) FROM stdin; +COPY zulip.two_factor_phonedevice (id, name, confirmed, throttling_failure_timestamp, throttling_failure_count, number, key, method, user_id) FROM stdin; \. @@ -5308,7 +4353,7 @@ COPY zulip.zerver_alertword (id, word, realm_id, user_profile_id) FROM stdin; -- Data for Name: zerver_archivedattachment; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_archivedattachment (id, file_name, path_id, is_realm_public, create_time, size, owner_id, realm_id, is_web_public) FROM stdin; +COPY zulip.zerver_archivedattachment (id, file_name, path_id, is_realm_public, create_time, size, owner_id, realm_id, is_web_public, content_type) FROM stdin; \. @@ -5324,7 +4369,7 @@ COPY zulip.zerver_archivedattachment_messages (id, archivedattachment_id, archiv -- Data for Name: zerver_archivedmessage; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_archivedmessage (id, subject, content, rendered_content, rendered_content_version, date_sent, last_edit_time, edit_history, has_attachment, has_image, has_link, recipient_id, sender_id, sending_client_id, archive_transaction_id, realm_id) FROM stdin; +COPY zulip.zerver_archivedmessage (id, subject, content, rendered_content, rendered_content_version, date_sent, last_edit_time, edit_history, has_attachment, has_image, has_link, recipient_id, sender_id, sending_client_id, archive_transaction_id, realm_id, type) FROM stdin; \. @@ -5356,7 +4401,7 @@ COPY zulip.zerver_archivedusermessage (id, flags, message_id, user_profile_id) F -- Data for Name: zerver_archivetransaction; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_archivetransaction (id, "timestamp", restored, type, realm_id) FROM stdin; +COPY zulip.zerver_archivetransaction (id, "timestamp", restored, type, realm_id, restored_timestamp) FROM stdin; \. @@ -5364,7 +4409,7 @@ COPY zulip.zerver_archivetransaction (id, "timestamp", restored, type, realm_id) -- Data for Name: zerver_attachment; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_attachment (id, file_name, path_id, create_time, owner_id, is_realm_public, realm_id, size, is_web_public) FROM stdin; +COPY zulip.zerver_attachment (id, file_name, path_id, create_time, owner_id, is_realm_public, realm_id, size, is_web_public, content_type) FROM stdin; \. @@ -5405,10 +4450,10 @@ COPY zulip.zerver_botstoragedata (id, key, value, bot_profile_id) FROM stdin; -- COPY zulip.zerver_client (id, name) FROM stdin; -1 website -2 ZulipMobile -3 ZulipElectron -4 Internal +1 Internal +2 website +3 ZulipMobile +4 ZulipElectron 5 internal \. @@ -5417,7 +4462,7 @@ COPY zulip.zerver_client (id, name) FROM stdin; -- Data for Name: zerver_customprofilefield; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_customprofilefield (id, name, field_type, realm_id, hint, field_data, "order", display_in_profile_summary) FROM stdin; +COPY zulip.zerver_customprofilefield (id, name, field_type, realm_id, hint, field_data, "order", display_in_profile_summary, required) FROM stdin; \. @@ -5435,6 +4480,8 @@ COPY zulip.zerver_customprofilefieldvalue (id, value, field_id, user_profile_id, COPY zulip.zerver_defaultstream (id, realm_id, stream_id) FROM stdin; 1 2 1 +2 2 2 +3 2 3 \. @@ -5475,18 +4522,18 @@ COPY zulip.zerver_emailchangestatus (id, new_email, old_email, updated_at, statu -- COPY zulip.zerver_groupgroupmembership (id, subgroup_id, supergroup_id) FROM stdin; -1 1 2 -2 2 3 -3 3 4 -4 4 5 -5 5 6 -6 6 7 -7 8 9 -8 9 10 -9 10 11 -10 11 12 -11 12 13 -12 13 14 +1 2 3 +2 3 4 +3 4 5 +4 5 6 +5 6 7 +6 7 8 +7 10 11 +8 11 12 +9 12 13 +10 13 14 +11 14 15 +12 15 16 \. @@ -5498,16 +4545,32 @@ COPY zulip.zerver_huddle (id, huddle_hash, recipient_id) FROM stdin; \. +-- +-- Data for Name: zerver_imageattachment; Type: TABLE DATA; Schema: zulip; Owner: zulip +-- + +COPY zulip.zerver_imageattachment (id, path_id, original_width_px, original_height_px, frames, thumbnail_metadata, realm_id) FROM stdin; +\. + + -- -- Data for Name: zerver_message; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_message (id, subject, content, rendered_content, rendered_content_version, last_edit_time, edit_history, has_attachment, has_image, has_link, recipient_id, sender_id, sending_client_id, search_tsvector, date_sent, realm_id) FROM stdin; -2 private streams This is a private stream, as indicated by the lock icon next to the stream name. Private streams are only visible to stream members.\n\nTo manage this stream, go to [Stream settings](#streams/subscribed) and click on `core team`.

This is a private stream, as indicated by the lock icon next to the stream name. Private streams are only visible to stream members.

\n

To manage this stream, go to Stream settings and click on core team.

1 \N \N f f t 9 7 4 'click':36 'core':38 'go':31 'icon':13 'indicate':9 'lock':12 'manage':28 'member':26 'name':18 'next':14 'private':1,6,19 'sett':34 'stream':2,7,17,20,25,30,33 'team':39 'visible':23 2022-04-23 08:50:55.400754+00 2 -3 topic demonstration This is a message on stream #**general** with the topic `topic demonstration`.

This is a message on stream #general with the topic topic demonstration.

1 \N \N f f t 8 7 4 'demonstrate':2,14 'demonstration':2,14 'general':9 'message':6 'stream':8 'topic':1,12,13 2022-04-23 08:50:55.431721+00 2 -4 topic demonstration Topics are a lightweight tool to keep conversations organised. You can learn more about topics at [Streams and topics](/help/streams-and-topics).

Topics are a lightweight tool to keep conversations organised. You can learn more about topics at Streams and topics.

1 \N \N f f t 8 7 4 'conversation':10 'demonstrate':2 'demonstration':2 'keep':9 'learn':14 'lightweight':6 'organis':11 'stream':19 'tool':7 'topic':1,3,17,21 2022-04-23 08:50:55.459067+00 2 -5 swimming turtles This is a message on stream #**general** with the topic `swimming turtles`.\n\n[](/static/images/cute/turtle.png)\n\n[Start a new topic](/help/start-a-new-topic) any time you're not replying to a previous message.

This is a message on stream #general with the topic swimming turtles.

\n

Start a new topic any time you're not replying to a previous message.

1 \N \N f t t 8 7 4 'general':9 'message':6,28 'new':17 'ply':24 'previous':27 're':22 'start':15 'stream':8 'swimming':1,13 'time':20 'topic':12,18 'turtle':2,14 2022-04-23 08:50:55.48362+00 2 -1 Hello, and welcome to Zulip!👋 This is a private message from me, Welcome Bot.\n\nIf you are new to Zulip, check out our [Getting started guide](/help/getting-started-with-zulip)! We also have a guide for [Setting up your organisation](https://localhost/help/getting-your-organization-started-with-zulip).\n\nI can also help you get set up! Just click anywhere on this message or press `r` to reply.\n\nHere are a few messages I understand: `apps`, `profile`, `theme`, `streams`, `topics`, `message formatting`, `keyboard shortcuts`, `help`.

Hello, and welcome to Zulip!:wave: This is a private message from me, Welcome Bot.

\n

If you are new to Zulip, check out our Getting started guide! We also have a guide for Setting up your organisation.

\n

I can also help you get set up! Just click anywhere on this message or press r to reply.

\n

Here are a few messages I understand: apps, profile, theme, streams, topics, message formatting, keyboard shortcuts, help.

1 \N \N f f t 10 7 4 'also':29,40 'anywhere':48 'app':64 'bot':15 'check':22 'click':47 'file':65 'formatting':70 'get':43 'getting':25 'guide':27,32 'hello':1 'help':41,73 'keyboard':71 'message':11,51,61,69 'new':19 'organis':37 'ply':56 'press':53 'private':10 'set':44 'sett':34 'setting':34 'shortcut':72 'start':26 'stream':67 'theme':66 'topic':68 'understand':63 'wave':6 'welcome':3,14 'zulip':5,21 2022-04-23 08:50:55.289481+00 2 +COPY zulip.zerver_message (id, subject, content, rendered_content, rendered_content_version, last_edit_time, edit_history, has_attachment, has_image, has_link, recipient_id, sender_id, sending_client_id, search_tsvector, date_sent, realm_id, type) FROM stdin; +1 moving messages If anything is out of place, it’s easy to [move messages](/help/move-content-to-another-topic), [rename](/help/rename-a-topic) and [split](/help/move-content-to-another-topic) topics, or even move a topic [to a different channel](/help/move-content-to-another-channel).

If anything is out of place, it’s easy to move messages, rename and split topics, or even move a topic to a different channel.

1 \N \N f f t 8 7 1 'anything':4 'channel':27 'different':26 'easy':11 'even':20 'message':2,14 'move':1,13,21 'moving':1 'name':15 'place':8 'split':17 'topic':18,23 2024-08-02 09:00:26.875464+00 2 1 +2 moving messages :point_right: Try moving this message to another topic and back.

:point_right: Try moving this message to another topic and back.

1 \N \N f f f 8 7 1 'another':10 'back':13 'message':2,8 'move':1,6 'moving':1,6 'point':3 'right':4 'topic':11 'try':5 2024-08-02 09:00:26.885994+00 2 1 +9 greetings :point_right: Click on this message to start a new message in the same conversation.

:point_right: Click on this message to start a new message in the same conversation.

1 \N \N f f f 10 7 1 'click':4 'conversation':16 'greet':1 'message':7,12 'new':11 'point':2 'right':3 'start':9 2024-08-02 09:00:26.973805+00 2 1 +10 welcome to Zulip! Zulip is organised to help you communicate more efficiently. Conversations are labeled with topics, which summarise what the conversation is about.\n\nFor example, this message is in the “welcome to Zulip!” topic in the #**Zulip** channel, as you can see in the left sidebar and above.

Zulip is organised to help you communicate more efficiently. Conversations are labeled with topics, which summarise what the conversation is about.

\n

For example, this message is in the “welcome to Zulip!” topic in the #Zulip channel, as you can see in the left sidebar and above.

1 \N \N f f t 8 7 1 'channel':39 'communicate':10 'conversation':13,22 'efficient':12 'example':26 'help':8 'label':15 'labeled':15 'left':46 'message':28 'organis':6 'see':43 'sidebar':47 'summaris':19 'topic':17,35 'welcome':1,32 'zulip':3,4,34,38 2024-08-02 09:00:26.979949+00 2 1 +11 welcome to Zulip! You can read Zulip one conversation at a time, seeing each message in context, no matter how many other conversations are going on.

You can read Zulip one conversation at a time, seeing each message in context, no matter how many other conversations are going on.

1 \N \N f f f 8 7 1 'conversation':9,23 'go':25 'going':25 'many':21 'matte':19 'matter':19 'message':15 'one':8 'read':6 'seeing':13 'text':17 'time':12 'welcome':1 'zulip':3,7 2024-08-02 09:00:26.986469+00 2 1 +12 welcome to Zulip! :point_right: When you're ready, check out your [Inbox](/#inbox) for other conversations with unread messages.

:point_right: When you're ready, check out your Inbox for other conversations with unread messages.

1 \N \N f f t 8 7 1 'check':10 'conversation':16 'inbox':13 'message':19 'point':4 're':8 'ready':9 'right':5 'unread':18 'welcome':1 'zulip':3 2024-08-02 09:00:26.992107+00 2 1 +13 Hello, and welcome to Zulip!👋 I've kicked off some conversations to help you get started. You can find them in your [Inbox](/#inbox).\n\n\n\nTo learn more, check out our [Getting started guide](/help/getting-started-with-zulip)! We also have a guide for [Setting up your organization](/help/getting-your-organization-started-with-zulip).

Hello, and welcome to Zulip!:wave: I've kicked off some conversations to help you get started. You can find them in your Inbox.

\n

To learn more, check out our Getting started guide! We also have a guide for Setting up your organization.

1 \N \N f f t 11 7 1 'also':35 'check':28 'conversation':12 'find':20 'get':16 'getting':31 'guide':33,38 'hello':1 'help':14 'inbox':24 'kick':9 'learn':26 'organization':43 'sett':40 'setting':40 'start':17,32 've':8 'wave':6 'welcome':3 'zulip':5 2024-08-02 09:00:27.069925+00 2 1 +3 experiments :point_right: Use this topic to try out [Zulip's messaging features](/help/format-your-message-using-markdown).

:point_right: Use this topic to try out Zulip's messaging features.

1 \N \N f f t 9 7 1 'experiment':1 'feature':13 'message':12 'point':2 'right':3 'topic':6 'try':8 'use':4 'zulip':10 2024-08-02 09:00:26.892065+00 2 1 +4 experiments ```spoiler Want to see some examples?\n\n````python\n\nprint("code blocks")\n\n````\n\n- bulleted\n- lists\n\nLink to a conversation: #**Zulip>welcome to Zulip!**\n\n```
\n

Want to see some examples?

\n
1 \N \N f f t 9 7 1 'block':9 'bullet':10 'code':8 'conversation':15 'example':6 'experiment':1 'link':12 'list':11 'print':7 'see':4 'want':2 'welcome':17 'zulip':16,19 2024-08-02 09:00:26.897933+00 2 1 +5 start a conversation To kick off a new conversation, click **Start new conversation** below. The new conversation thread will be labeled with its own topic.

To kick off a new conversation, click Start new conversation below. The new conversation thread will be labeled with its own topic.

1 \N \N f f f 9 7 1 'click':10 'conversation':3,9,13,17 'kick':5 'label':21 'labeled':21 'new':8,12,16 'start':1,11 'thread':18 'topic':25 2024-08-02 09:00:26.949992+00 2 1 +6 start a conversation For a good topic name, think about finishing the sentence: “Hey, can we chat about…?”

For a good topic name, think about finishing the sentence: “Hey, can we chat about…?”

1 \N \N f f f 9 7 1 'chat':17 'conversation':3 'finish':11 'good':6 'hey':14 'name':8 'sentence':13 'start':1 'think':9 'topic':7 2024-08-02 09:00:26.956408+00 2 1 +7 start a conversation :point_right: Try starting a new conversation in this channel.

:point_right: Try starting a new conversation in this channel.

1 \N \N f f f 9 7 1 'channel':13 'conversation':3,10 'new':9 'point':4 'right':5 'start':1,7 'try':6 2024-08-02 09:00:26.962116+00 2 1 +8 greetings This **greetings** topic is a great place to say “hi” :wave: to your teammates.

This greetings topic is a great place to say “hi” :wave: to your teammates.

1 \N \N f f f 10 7 1 'great':7 'greet':1,3 'hi':11 'place':8 'say':10 'teammate':15 'topic':4 'wave':12 2024-08-02 09:00:26.967873+00 2 1 \. @@ -5523,7 +4586,7 @@ COPY zulip.zerver_missedmessageemailaddress (id, email_token, "timestamp", times -- Data for Name: zerver_multiuseinvite; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_multiuseinvite (id, realm_id, referred_by_id, invited_as, status) FROM stdin; +COPY zulip.zerver_multiuseinvite (id, realm_id, referred_by_id, invited_as, status, include_realm_default_subscriptions) FROM stdin; \. @@ -5543,11 +4606,56 @@ COPY zulip.zerver_muteduser (id, date_muted, muted_user_id, user_profile_id) FRO \. +-- +-- Data for Name: zerver_namedusergroup; Type: TABLE DATA; Schema: zulip; Owner: zulip +-- + +COPY zulip.zerver_namedusergroup (usergroup_ptr_id, name, description, is_system_group, can_mention_group_id, realm_id) FROM stdin; +1 role:nobody Nobody t 1 1 +2 role:owners Owners of this organization t 1 1 +3 role:administrators Administrators of this organization, including owners t 1 1 +4 role:moderators Moderators of this organization, including administrators t 1 1 +5 role:fullmembers Members of this organization, not including new accounts and guests t 1 1 +6 role:members Members of this organization, not including guests t 1 1 +7 role:everyone Everyone in this organization, including guests t 1 1 +8 role:internet Everyone on the Internet t 1 1 +9 role:nobody Nobody t 9 2 +10 role:owners Owners of this organization t 9 2 +11 role:administrators Administrators of this organization, including owners t 9 2 +12 role:moderators Moderators of this organization, including administrators t 9 2 +13 role:fullmembers Members of this organization, not including new accounts and guests t 9 2 +14 role:members Members of this organization, not including guests t 9 2 +15 role:everyone Everyone in this organization, including guests t 9 2 +16 role:internet Everyone on the Internet t 9 2 +\. + + -- -- Data for Name: zerver_onboardingstep; Type: TABLE DATA; Schema: zulip; Owner: zulip -- COPY zulip.zerver_onboardingstep (id, onboarding_step, "timestamp", user_id) FROM stdin; +1 visibility_policy_banner 2024-08-02 09:00:27.079678+00 8 +\. + + +-- +-- Data for Name: zerver_onboardingusermessage; Type: TABLE DATA; Schema: zulip; Owner: zulip +-- + +COPY zulip.zerver_onboardingusermessage (id, flags, message_id, realm_id) FROM stdin; +1 6 1 2 +2 2 2 2 +3 6 3 2 +4 2 4 2 +5 6 5 2 +6 2 6 2 +7 2 7 2 +8 6 8 2 +9 2 9 2 +10 6 10 2 +11 2 11 2 +12 2 12 2 \. @@ -5556,6 +4664,7 @@ COPY zulip.zerver_onboardingstep (id, onboarding_step, "timestamp", user_id) FRO -- COPY zulip.zerver_preregistrationrealm (id, name, org_type, string_id, email, status, created_realm_id, created_user_id, default_language) FROM stdin; +1 testing 10 test@test.com 1 2 8 en-gb \. @@ -5563,8 +4672,7 @@ COPY zulip.zerver_preregistrationrealm (id, name, org_type, string_id, email, st -- Data for Name: zerver_preregistrationuser; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_preregistrationuser (id, email, invited_at, status, realm_id, referred_by_id, realm_creation, password_required, invited_as, full_name, full_name_validated, created_user_id, multiuse_invite_id) FROM stdin; -1 test@test.com 2022-04-23 08:50:40.19388+00 1 \N \N t t 400 \N f \N \N +COPY zulip.zerver_preregistrationuser (id, email, invited_at, status, realm_id, referred_by_id, realm_creation, password_required, invited_as, full_name, full_name_validated, created_user_id, multiuse_invite_id, include_realm_default_subscriptions, notify_referrer_on_join) FROM stdin; \. @@ -5576,6 +4684,16 @@ COPY zulip.zerver_preregistrationuser_streams (id, preregistrationuser_id, strea \. +-- +-- Data for Name: zerver_presencesequence; Type: TABLE DATA; Schema: zulip; Owner: zulip +-- + +COPY zulip.zerver_presencesequence (id, last_update_id, realm_id) FROM stdin; +1 0 1 +2 3 2 +\. + + -- -- Data for Name: zerver_pushdevicetoken; Type: TABLE DATA; Schema: zulip; Owner: zulip -- @@ -5589,7 +4707,7 @@ COPY zulip.zerver_pushdevicetoken (id, kind, token, last_updated, ios_app_id, us -- COPY zulip.zerver_reaction (id, user_profile_id, message_id, emoji_name, emoji_code, reaction_type) FROM stdin; -1 7 5 turtle 1f422 unicode_emoji +1 7 8 wave 1f44b unicode_emoji \. @@ -5597,9 +4715,9 @@ COPY zulip.zerver_reaction (id, user_profile_id, message_id, emoji_name, emoji_c -- Data for Name: zerver_realm; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_realm (id, name, emails_restricted_to_domains, invite_required, mandatory_topics, digest_emails_enabled, name_changes_disabled, date_created, deactivated, notifications_stream_id, allow_message_editing, message_content_edit_limit_seconds, default_language, string_id, org_type, message_retention_days, waiting_period_threshold, icon_source, icon_version, email_changes_disabled, description, inline_image_preview, inline_url_embed_preview, allow_edit_history, signup_notifications_stream_id, max_invites, message_visibility_limit, upload_quota_gb, send_welcome_emails, bot_creation_policy, disallow_disposable_email_addresses, message_content_delete_limit_seconds, plan_type, first_visible_message_id, logo_source, logo_version, message_content_allowed_in_email_notifications, night_logo_source, night_logo_version, digest_weekday, invite_to_stream_policy, avatar_changes_disabled, video_chat_provider, user_group_edit_policy, private_message_policy, default_code_block_language, wildcard_mention_policy, deactivated_redirect, invite_to_realm_policy, giphy_rating, move_messages_between_streams_policy, edit_topic_policy, add_custom_emoji_policy, demo_organization_scheduled_deletion_date, delete_own_message_policy, create_private_stream_policy, create_public_stream_policy, create_web_public_stream_policy, enable_spectator_access, want_advertise_in_communities_directory, enable_read_receipts, move_messages_within_stream_limit_seconds, move_messages_between_streams_limit_seconds, create_multiuse_invite_group_id, jitsi_server_url, enable_guest_user_indicator, uuid, uuid_owner_secret, can_access_all_users_group_id, push_notifications_enabled, push_notifications_enabled_end_timestamp) FROM stdin; -1 System bot realm f t f f f 2022-04-23 08:50:54.621821+00 f \N t 600 en zulipinternal 0 -1 0 G 1 f t f t \N \N \N \N t 1 t 600 1 0 D 1 t D 1 1 1 f 1 1 1 5 \N 1 2 2 5 1 \N 2 1 1 7 f f t 604800 604800 9 \N t 062152ee-6a9a-4625-b4da-7f3da9b3db47 zuliprealm_7iircLBb3UavPP9tWDiaBKBqR72jh33C 13 f \N -2 testing f t f f f 2022-04-23 08:50:54.873981+00 f 1 t 600 en 10 -1 0 G 1 f t f t 2 \N \N \N t 1 t 600 1 0 D 1 t D 1 1 1 f 1 1 1 5 \N 1 2 2 5 1 \N 2 1 1 7 f f t 604800 604800 2 \N t 32a73aea-ff10-45d4-8ee3-c78b5ec818c0 zuliprealm_4YE3BT2BIsSJ5cASRwWUzE87bTx9xi38 6 f \N +COPY zulip.zerver_realm (id, name, emails_restricted_to_domains, invite_required, mandatory_topics, digest_emails_enabled, name_changes_disabled, date_created, deactivated, new_stream_announcements_stream_id, allow_message_editing, message_content_edit_limit_seconds, default_language, string_id, org_type, message_retention_days, waiting_period_threshold, icon_source, icon_version, email_changes_disabled, description, inline_image_preview, inline_url_embed_preview, allow_edit_history, signup_announcements_stream_id, max_invites, message_visibility_limit, send_welcome_emails, bot_creation_policy, disallow_disposable_email_addresses, message_content_delete_limit_seconds, plan_type, first_visible_message_id, logo_source, logo_version, message_content_allowed_in_email_notifications, night_logo_source, night_logo_version, digest_weekday, invite_to_stream_policy, avatar_changes_disabled, video_chat_provider, user_group_edit_policy, default_code_block_language, wildcard_mention_policy, deactivated_redirect, invite_to_realm_policy, giphy_rating, move_messages_between_streams_policy, edit_topic_policy, add_custom_emoji_policy, demo_organization_scheduled_deletion_date, delete_own_message_policy, create_web_public_stream_policy, enable_spectator_access, want_advertise_in_communities_directory, enable_read_receipts, move_messages_within_stream_limit_seconds, move_messages_between_streams_limit_seconds, create_multiuse_invite_group_id, jitsi_server_url, enable_guest_user_indicator, uuid, uuid_owner_secret, can_access_all_users_group_id, push_notifications_enabled, push_notifications_enabled_end_timestamp, zulip_update_announcements_stream_id, zulip_update_announcements_level, require_unique_names, custom_upload_quota_gb, can_create_public_channel_group_id, can_create_private_channel_group_id, direct_message_initiator_group_id, direct_message_permission_group_id) FROM stdin; +1 System bot realm f t f f f 2024-08-02 09:00:26.607909+00 f \N t 600 en zulipinternal 0 -1 0 G 1 f t f t \N \N \N t 1 t 600 1 0 D 1 t D 1 1 1 f 1 1 5 \N 1 2 1 5 1 \N 5 7 f f f 604800 604800 3 \N t d8fd5bda-7125-499b-bfa3-230089eefe75 zuliprealm_JBRC2TDwdsQV07haPatn3o4apY6jxABz 7 f \N \N \N f \N 6 6 7 7 +2 testing f t f f f 2024-08-02 09:00:26.698642+00 f 3 t 600 en-gb 10 -1 0 G 1 f t f t \N \N \N t 1 t 600 1 0 D 1 t D 1 1 1 f 1 1 5 \N 1 2 1 5 1 \N 5 7 f f t 604800 604800 11 \N t f2c61d8f-c5ab-4149-a334-42fc5ddd633c zuliprealm_AFFRvSPWum18wttzDo3Keg41uj1BPDUV 15 f \N 3 8 f \N 14 14 15 15 \. @@ -5608,20 +4726,77 @@ COPY zulip.zerver_realm (id, name, emails_restricted_to_domains, invite_required -- COPY zulip.zerver_realmauditlog (id, backfilled, event_time, acting_user_id, modified_stream_id, modified_user_id, realm_id, event_last_message_id, event_type, extra_data, modified_user_group_id) FROM stdin; -1 f 2022-04-23 08:50:54.621821+00 \N \N \N 1 \N 215 {} \N -2 f 2022-04-23 08:50:54.676975+00 \N \N 1 1 \N 101 {} \N -3 f 2022-04-23 08:50:54.677875+00 \N \N 2 1 \N 101 {} \N -4 f 2022-04-23 08:50:54.67837+00 \N \N 3 1 \N 101 {} \N -5 f 2022-04-23 08:50:54.678796+00 \N \N 4 1 \N 101 {} \N -6 f 2022-04-23 08:50:54.679357+00 \N \N 5 1 \N 101 {} \N -7 f 2022-04-23 08:50:54.680045+00 \N \N 6 1 \N 101 {} \N -8 f 2022-04-23 08:50:54.680469+00 \N \N 7 1 \N 101 {} \N -10 f 2022-04-23 08:50:54.977232+00 \N 1 \N 2 \N 601 {} \N -11 f 2022-04-23 08:50:55.010443+00 \N 2 \N 2 \N 601 {} \N -9 f 2022-04-23 08:50:54.873981+00 8 \N \N 2 \N 215 {} \N -13 f 2022-04-23 08:50:55.246779+00 \N 1 8 2 -1 301 {} \N -14 f 2022-04-23 08:50:55.349274+00 \N 2 8 2 1 301 {} \N -12 f 2022-04-23 08:50:55.05282+00 8 \N 8 2 \N 101 {"10": {"11": {"100": 1, "200": 0, "300": 0, "400": 0, "600": 0}, "12": 0}} \N +1 f 2024-08-02 09:00:26.607909+00 \N \N \N 1 \N 215 {} \N +2 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 1 +3 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 2 +4 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 3 +5 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 4 +6 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 5 +7 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 6 +8 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 7 +9 f 2024-08-02 09:00:26.627518+00 \N \N \N 1 \N 701 {} 8 +10 f 2024-08-02 09:00:26.630242+00 \N \N \N 1 \N 705 {"subgroup_ids": [2]} 3 +11 f 2024-08-02 09:00:26.630242+00 \N \N \N 1 \N 707 {"supergroup_ids": [3]} 2 +12 f 2024-08-02 09:00:26.630324+00 \N \N \N 1 \N 705 {"subgroup_ids": [3]} 4 +13 f 2024-08-02 09:00:26.630324+00 \N \N \N 1 \N 707 {"supergroup_ids": [4]} 3 +14 f 2024-08-02 09:00:26.630404+00 \N \N \N 1 \N 705 {"subgroup_ids": [4]} 5 +15 f 2024-08-02 09:00:26.630404+00 \N \N \N 1 \N 707 {"supergroup_ids": [5]} 4 +16 f 2024-08-02 09:00:26.630466+00 \N \N \N 1 \N 705 {"subgroup_ids": [5]} 6 +17 f 2024-08-02 09:00:26.630466+00 \N \N \N 1 \N 707 {"supergroup_ids": [6]} 5 +18 f 2024-08-02 09:00:26.630528+00 \N \N \N 1 \N 705 {"subgroup_ids": [6]} 7 +19 f 2024-08-02 09:00:26.630528+00 \N \N \N 1 \N 707 {"supergroup_ids": [7]} 6 +20 f 2024-08-02 09:00:26.6306+00 \N \N \N 1 \N 705 {"subgroup_ids": [7]} 8 +21 f 2024-08-02 09:00:26.6306+00 \N \N \N 1 \N 707 {"supergroup_ids": [8]} 7 +22 f 2024-08-02 09:00:26.651917+00 \N \N 1 1 \N 101 {} \N +23 f 2024-08-02 09:00:26.652263+00 \N \N 2 1 \N 101 {} \N +24 f 2024-08-02 09:00:26.652425+00 \N \N 3 1 \N 101 {} \N +25 f 2024-08-02 09:00:26.65259+00 \N \N 4 1 \N 101 {} \N +26 f 2024-08-02 09:00:26.652751+00 \N \N 5 1 \N 101 {} \N +27 f 2024-08-02 09:00:26.652896+00 \N \N 6 1 \N 101 {} \N +28 f 2024-08-02 09:00:26.653052+00 \N \N 7 1 \N 101 {} \N +29 f 2024-08-02 09:00:26.668949+00 \N \N 1 1 \N 703 {} 6 +30 f 2024-08-02 09:00:26.668949+00 \N \N 1 1 \N 703 {} 5 +31 f 2024-08-02 09:00:26.668949+00 \N \N 2 1 \N 703 {} 6 +32 f 2024-08-02 09:00:26.668949+00 \N \N 2 1 \N 703 {} 5 +33 f 2024-08-02 09:00:26.668949+00 \N \N 3 1 \N 703 {} 6 +34 f 2024-08-02 09:00:26.668949+00 \N \N 3 1 \N 703 {} 5 +35 f 2024-08-02 09:00:26.668949+00 \N \N 4 1 \N 703 {} 6 +36 f 2024-08-02 09:00:26.668949+00 \N \N 4 1 \N 703 {} 5 +37 f 2024-08-02 09:00:26.668949+00 \N \N 5 1 \N 703 {} 6 +38 f 2024-08-02 09:00:26.668949+00 \N \N 5 1 \N 703 {} 5 +39 f 2024-08-02 09:00:26.668949+00 \N \N 6 1 \N 703 {} 6 +40 f 2024-08-02 09:00:26.668949+00 \N \N 6 1 \N 703 {} 5 +41 f 2024-08-02 09:00:26.668949+00 \N \N 7 1 \N 703 {} 6 +42 f 2024-08-02 09:00:26.668949+00 \N \N 7 1 \N 703 {} 5 +44 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 9 +45 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 10 +46 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 11 +47 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 12 +48 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 13 +49 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 14 +50 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 15 +51 f 2024-08-02 09:00:26.70361+00 \N \N \N 2 \N 701 {} 16 +52 f 2024-08-02 09:00:26.705239+00 \N \N \N 2 \N 705 {"subgroup_ids": [10]} 11 +53 f 2024-08-02 09:00:26.705239+00 \N \N \N 2 \N 707 {"supergroup_ids": [11]} 10 +54 f 2024-08-02 09:00:26.70529+00 \N \N \N 2 \N 705 {"subgroup_ids": [11]} 12 +55 f 2024-08-02 09:00:26.70529+00 \N \N \N 2 \N 707 {"supergroup_ids": [12]} 11 +56 f 2024-08-02 09:00:26.705331+00 \N \N \N 2 \N 705 {"subgroup_ids": [12]} 13 +57 f 2024-08-02 09:00:26.705331+00 \N \N \N 2 \N 707 {"supergroup_ids": [13]} 12 +58 f 2024-08-02 09:00:26.705372+00 \N \N \N 2 \N 705 {"subgroup_ids": [13]} 14 +59 f 2024-08-02 09:00:26.705372+00 \N \N \N 2 \N 707 {"supergroup_ids": [14]} 13 +60 f 2024-08-02 09:00:26.705411+00 \N \N \N 2 \N 705 {"subgroup_ids": [14]} 15 +61 f 2024-08-02 09:00:26.705411+00 \N \N \N 2 \N 707 {"supergroup_ids": [15]} 14 +62 f 2024-08-02 09:00:26.705451+00 \N \N \N 2 \N 705 {"subgroup_ids": [15]} 16 +63 f 2024-08-02 09:00:26.705451+00 \N \N \N 2 \N 707 {"supergroup_ids": [16]} 15 +64 f 2024-08-02 09:00:26.741474+00 \N 1 \N 2 \N 601 {} \N +65 f 2024-08-02 09:00:26.755626+00 \N 2 \N 2 \N 601 {} \N +66 f 2024-08-02 09:00:26.760282+00 \N 3 \N 2 \N 601 {} \N +67 f 2024-08-02 09:00:26.769576+00 8 \N 8 2 \N 101 {"10": {"11": {"100": 1, "200": 0, "300": 0, "400": 0, "600": 0}, "12": 0}} \N +43 f 2024-08-02 09:00:26.698642+00 8 \N \N 2 \N 215 {"how_realm_creator_found_zulip": "Search engine", "how_realm_creator_found_zulip_extra_context": ""} \N +68 f 2024-08-02 09:00:26.769576+00 8 \N 8 2 \N 703 {} 10 +69 f 2024-08-02 09:00:27.050611+00 \N 1 8 2 12 301 {} \N +70 f 2024-08-02 09:00:27.050611+00 \N 2 8 2 12 301 {} \N +71 f 2024-08-02 09:00:27.050611+00 \N 3 8 2 12 301 {} \N \. @@ -5630,27 +4805,27 @@ COPY zulip.zerver_realmauditlog (id, backfilled, event_time, acting_user_id, mod -- COPY zulip.zerver_realmauthenticationmethod (id, name, realm_id) FROM stdin; -1 Google 1 +1 Dev 1 2 Email 1 -3 GitHub 1 -4 LDAP 1 -5 Dev 1 -6 RemoteUser 1 -7 AzureAD 1 -8 SAML 1 -9 GitLab 1 -10 Apple 1 +3 LDAP 1 +4 RemoteUser 1 +5 GitHub 1 +6 AzureAD 1 +7 GitLab 1 +8 Google 1 +9 Apple 1 +10 SAML 1 11 OpenID Connect 1 -12 Google 2 +12 Dev 2 13 Email 2 -14 GitHub 2 -15 LDAP 2 -16 Dev 2 -17 RemoteUser 2 -18 AzureAD 2 -19 SAML 2 -20 GitLab 2 -21 Apple 2 +14 LDAP 2 +15 RemoteUser 2 +16 GitHub 2 +17 AzureAD 2 +18 GitLab 2 +19 Google 2 +20 Apple 2 +21 SAML 2 22 OpenID Connect 2 \. @@ -5699,9 +4874,9 @@ COPY zulip.zerver_realmreactivationstatus (id, status, realm_id) FROM stdin; -- Data for Name: zerver_realmuserdefault; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_realmuserdefault (id, enter_sends, left_side_userlist, default_language, web_home_view, dense_mode, fluid_layout_width, high_contrast_mode, translate_emoticons, twenty_four_hour_time, starred_message_counts, color_scheme, demote_inactive_streams, emojiset, enable_stream_desktop_notifications, enable_stream_email_notifications, enable_stream_push_notifications, enable_stream_audible_notifications, notification_sound, wildcard_mentions_notify, enable_desktop_notifications, pm_content_in_desktop_notifications, enable_sounds, enable_offline_email_notifications, message_content_in_email_notifications, enable_offline_push_notifications, enable_online_push_notifications, desktop_icon_count_display, enable_digest_emails, enable_login_emails, enable_marketing_emails, presence_enabled, realm_id, email_notifications_batching_period_seconds, enable_drafts_synchronization, send_private_typing_notifications, send_stream_typing_notifications, send_read_receipts, web_escape_navigates_to_home_view, display_emoji_reaction_users, user_list_style, email_address_visibility, realm_name_in_email_notifications_policy, web_mark_read_on_scroll_policy, enable_followed_topic_audible_notifications, enable_followed_topic_desktop_notifications, enable_followed_topic_email_notifications, enable_followed_topic_push_notifications, enable_followed_topic_wildcard_mentions_notify, web_stream_unreads_count_display_policy, automatically_follow_topics_policy, automatically_unmute_topics_in_muted_streams_policy, automatically_follow_topics_where_mentioned) FROM stdin; -1 f f en recent_topics t f f f f t 1 1 google f f f f zulip t t t t t t t t 1 t t t t 1 120 t t t t t t 2 1 1 1 t t t t t 2 3 2 t -2 f f en recent_topics t f f f f t 1 1 google f f f f zulip t t t t t t t t 1 t t t t 2 120 t t t t t t 2 1 1 1 t t t t t 2 3 2 t +COPY zulip.zerver_realmuserdefault (id, enter_sends, left_side_userlist, default_language, web_home_view, dense_mode, fluid_layout_width, high_contrast_mode, translate_emoticons, twenty_four_hour_time, starred_message_counts, color_scheme, demote_inactive_streams, emojiset, enable_stream_desktop_notifications, enable_stream_email_notifications, enable_stream_push_notifications, enable_stream_audible_notifications, notification_sound, wildcard_mentions_notify, enable_desktop_notifications, pm_content_in_desktop_notifications, enable_sounds, enable_offline_email_notifications, message_content_in_email_notifications, enable_offline_push_notifications, enable_online_push_notifications, desktop_icon_count_display, enable_digest_emails, enable_login_emails, enable_marketing_emails, presence_enabled, realm_id, email_notifications_batching_period_seconds, enable_drafts_synchronization, send_private_typing_notifications, send_stream_typing_notifications, send_read_receipts, web_escape_navigates_to_home_view, display_emoji_reaction_users, user_list_style, email_address_visibility, realm_name_in_email_notifications_policy, web_mark_read_on_scroll_policy, enable_followed_topic_audible_notifications, enable_followed_topic_desktop_notifications, enable_followed_topic_email_notifications, enable_followed_topic_push_notifications, enable_followed_topic_wildcard_mentions_notify, web_stream_unreads_count_display_policy, automatically_follow_topics_policy, automatically_unmute_topics_in_muted_streams_policy, automatically_follow_topics_where_mentioned, web_font_size_px, web_line_height_percent, receives_typing_notifications, web_navigate_to_sent_message, web_channel_default_view, web_animate_image_previews) FROM stdin; +1 f f en inbox f f f f f t 1 1 google f f f f zulip t t t t t t t t 1 t t t t 1 120 t t t t t t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +2 f f en inbox f f f f f t 1 1 google f f f f zulip t t t t t t t t 1 t t t t 2 120 t t t t t t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover \. @@ -5719,7 +4894,8 @@ COPY zulip.zerver_recipient (id, type_id, type) FROM stdin; 7 7 1 8 1 2 9 2 2 -10 8 1 +10 3 2 +11 8 1 \. @@ -5728,6 +4904,9 @@ COPY zulip.zerver_recipient (id, type_id, type) FROM stdin; -- COPY zulip.zerver_scheduledemail (id, scheduled_timestamp, data, address, type, realm_id) FROM stdin; +1 2024-08-06 08:00:27.063781+00 {"template_prefix":"zerver/emails/onboarding_zulip_topics","from_name":null,"from_address":"SUPPORT","language":null,"context":{"realm_url":"https://localhost","realm_name":"testing","root_domain_url":"https://localhost","external_url_scheme":"https://","external_host":"localhost","user_name":"tester","corporate_enabled":false,"unsubscribe_link":"https://localhost/accounts/unsubscribe/welcome/aasgnk3uxlzdurlf4mbgdc22","move_messages_link":"https://localhost/help/move-content-to-another-topic","rename_topics_link":"https://localhost/help/rename-a-topic","move_channels_link":"https://localhost/help/move-content-to-another-channel"}} \N 1 2 +2 2024-08-08 08:00:27.065293+00 {"template_prefix":"zerver/emails/onboarding_zulip_guide","from_name":null,"from_address":"SUPPORT","language":null,"context":{"realm_url":"https://localhost","realm_name":"testing","root_domain_url":"https://localhost","external_url_scheme":"https://","external_host":"localhost","user_name":"tester","corporate_enabled":false,"unsubscribe_link":"https://localhost/accounts/unsubscribe/welcome/aasgnk3uxlzdurlf4mbgdc22","organization_type":"business","zulip_guide_link":"https://zulip.com/for/business/"}} \N 1 2 +3 2024-08-12 08:00:27.066258+00 {"template_prefix":"zerver/emails/onboarding_team_to_zulip","from_name":null,"from_address":"SUPPORT","language":null,"context":{"realm_url":"https://localhost","realm_name":"testing","root_domain_url":"https://localhost","external_url_scheme":"https://","external_host":"localhost","user_name":"tester","corporate_enabled":false,"unsubscribe_link":"https://localhost/accounts/unsubscribe/welcome/aasgnk3uxlzdurlf4mbgdc22","get_organization_started":"https://localhost/help/getting-your-organization-started-with-zulip","invite_users":"https://localhost/help/invite-users-to-join","trying_out_zulip":"https://localhost/help/trying-out-zulip","why_zulip":"https://zulip.com/why-zulip/"}} \N 1 2 \. @@ -5736,6 +4915,9 @@ COPY zulip.zerver_scheduledemail (id, scheduled_timestamp, data, address, type, -- COPY zulip.zerver_scheduledemail_users (id, scheduledemail_id, userprofile_id) FROM stdin; +1 1 8 +2 2 8 +3 3 8 \. @@ -5767,9 +4949,10 @@ COPY zulip.zerver_service (id, name, base_url, token, interface, user_profile_id -- Data for Name: zerver_stream; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_stream (id, name, invite_only, email_token, description, date_created, deactivated, realm_id, is_in_zephyr_realm, history_public_to_subscribers, is_web_public, rendered_description, first_message_id, message_retention_days, recipient_id, stream_post_policy, can_remove_subscribers_group_id) FROM stdin; -2 core team t e10c7ab67caf282fd32d3ef041ab812a A private stream for core team members. 2022-04-23 08:50:55.000878+00 f 2 f f f

A private stream for core team members.

2 \N 9 1 2 -1 general f 9a384e15320de677d25cc2b3932ee218 Everyone is added to this stream by default. Welcome! :octopus: 2022-04-23 08:50:54.907375+00 f 2 f t f

Everyone is added to this stream by default. Welcome! :octopus:

5 \N 8 1 2 +COPY zulip.zerver_stream (id, name, invite_only, email_token, description, date_created, deactivated, realm_id, is_in_zephyr_realm, history_public_to_subscribers, is_web_public, rendered_description, first_message_id, message_retention_days, recipient_id, stream_post_policy, can_remove_subscribers_group_id, creator_id) FROM stdin; +2 sandbox f c65710313dcb1e8570f8bd2c6beeb0b4 Experiment with Zulip here. :test_tube: 2024-08-02 09:00:26.751749+00 f 2 f t f

Experiment with Zulip here. :test_tube:

7 \N 9 1 11 \N +3 general f 7c7126bc836d5bcf7d19305ec5ebc3a5 For team-wide conversations 2024-08-02 09:00:26.758357+00 f 2 f t f

For team-wide conversations

9 \N 10 1 11 \N +1 Zulip f 49581c9bc9d5ea384e0bf3feab9a00ad Questions and discussion about using Zulip. 2024-08-02 09:00:26.714957+00 f 2 f t f

Questions and discussion about using Zulip.

12 \N 8 1 11 \N \. @@ -5793,9 +4976,10 @@ COPY zulip.zerver_subscription (id, active, color, desktop_notifications, audibl 5 t #c2c2c2 \N \N 5 5 f \N \N f \N t 6 t #c2c2c2 \N \N 6 6 f \N \N f \N t 7 t #c2c2c2 \N \N 7 7 f \N \N f \N t -8 t #c2c2c2 \N \N 10 8 f \N \N f \N t +8 t #c2c2c2 \N \N 11 8 f \N \N f \N t 9 t #76ce90 \N \N 8 8 f \N \N f \N t 10 t #fae589 \N \N 9 8 f \N \N f \N t +11 t #a6c7e5 \N \N 10 8 f \N \N f \N t \. @@ -5804,15 +4988,15 @@ COPY zulip.zerver_subscription (id, active, color, desktop_notifications, audibl -- COPY zulip.zerver_useractivity (id, query, count, last_visit, client_id, user_profile_id) FROM stdin; -1 log_into_subdomain 1 2022-04-23 08:50:55+00 1 8 -2 home_real 1 2022-04-23 08:50:55+00 1 8 -3 /api/v1/events/internal 2 2022-04-23 08:50:55+00 5 8 -6 update_message_flags 1 2022-04-23 08:50:57+00 1 8 -7 report_narrow_times 1 2022-04-23 08:50:57+00 1 8 -8 set_tutorial_status 1 2022-04-23 08:50:58+00 1 8 -9 json_fetch_api_key 1 2022-04-23 08:51:28+00 1 8 -5 get_messages_backend 5 2022-04-23 08:51:43+00 1 8 -4 get_events 4 2022-04-23 08:51:45+00 1 8 +1 log_into_subdomain 1 2024-08-02 09:00:27+00 2 8 +2 home_real 1 2024-08-02 09:00:27+00 2 8 +3 /api/v1/events/internal 2 2024-08-02 09:00:27+00 5 8 +5 get_messages_backend 3 2024-08-02 09:00:28+00 2 8 +7 set_tutorial_status 1 2024-08-02 09:00:28+00 2 8 +8 update_message_flags 1 2024-08-02 09:00:28+00 2 8 +9 get_user_invites 1 2024-08-02 09:00:48+00 2 8 +12 json_fetch_api_key 2 2024-08-02 09:02:42+00 2 8 +6 get_events 6 2024-08-02 09:03:14+00 2 8 \. @@ -5821,7 +5005,7 @@ COPY zulip.zerver_useractivity (id, query, count, last_visit, client_id, user_pr -- COPY zulip.zerver_useractivityinterval (id, start, "end", user_profile_id) FROM stdin; -1 2022-04-23 08:50:56+00 2022-04-23 09:06:46+00 8 +1 2024-08-02 09:00:28+00 2024-08-02 09:17:28+00 8 \. @@ -5829,23 +5013,23 @@ COPY zulip.zerver_useractivityinterval (id, start, "end", user_profile_id) FROM -- Data for Name: zerver_usergroup; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_usergroup (id, name, realm_id, description, is_system_group, can_mention_group_id) FROM stdin; -8 role:owners 1 Owners of this organization t 15 -9 role:administrators 1 Administrators of this organization, including owners t 15 -10 role:moderators 1 Moderators of this organization, including administrators t 15 -11 role:fullmembers 1 Members of this organization, not including new accounts and guests t 15 -12 role:members 1 Members of this organization, not including guests t 15 -13 role:everyone 1 Everyone in this organization, including guests t 15 -14 role:internet 1 Everyone on the Internet t 15 -15 role:nobody 1 Nobody t 15 -1 role:owners 2 Owners of this organization t 16 -2 role:administrators 2 Administrators of this organization, including owners t 16 -3 role:moderators 2 Moderators of this organization, including administrators t 16 -4 role:fullmembers 2 Members of this organization, not including new accounts and guests t 16 -5 role:members 2 Members of this organization, not including guests t 16 -6 role:everyone 2 Everyone in this organization, including guests t 16 -7 role:internet 2 Everyone on the Internet t 16 -16 role:nobody 2 Nobody t 16 +COPY zulip.zerver_usergroup (id, realm_id) FROM stdin; +1 1 +2 1 +3 1 +4 1 +5 1 +6 1 +7 1 +8 1 +9 2 +10 2 +11 2 +12 2 +13 2 +14 2 +15 2 +16 2 \. @@ -5854,21 +5038,21 @@ COPY zulip.zerver_usergroup (id, name, realm_id, description, is_system_group, c -- COPY zulip.zerver_usergroupmembership (id, user_group_id, user_profile_id) FROM stdin; -1 1 8 -2 12 2 -3 11 2 -4 12 3 -5 11 3 -6 12 4 -7 11 4 -8 12 5 -9 11 5 -10 12 6 -11 11 6 -12 12 7 -13 11 7 -14 12 1 -15 11 1 +1 6 1 +2 5 1 +3 6 2 +4 5 2 +5 6 3 +6 5 3 +7 6 4 +8 5 4 +9 6 5 +10 5 5 +11 6 6 +12 5 6 +13 6 7 +14 5 7 +15 10 8 \. @@ -5877,12 +5061,20 @@ COPY zulip.zerver_usergroupmembership (id, user_group_id, user_profile_id) FROM -- COPY zulip.zerver_usermessage (flags, message_id, user_profile_id, id) FROM stdin; -2048 1 7 2 -0 2 8 3 -0 3 8 4 -0 4 8 5 -0 5 8 6 -2049 1 8 1 +2 1 8 1 +0 2 8 2 +2 3 8 3 +0 4 8 4 +2 5 8 5 +0 6 8 6 +0 7 8 7 +2 8 8 8 +0 9 8 9 +2 10 8 10 +0 11 8 11 +0 12 8 12 +2048 13 7 14 +2051 13 8 13 \. @@ -5890,8 +5082,8 @@ COPY zulip.zerver_usermessage (flags, message_id, user_profile_id, id) FROM stdi -- Data for Name: zerver_userpresence; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_userpresence (id, last_connected_time, last_active_time, realm_id, user_profile_id) FROM stdin; -1 2022-04-23 08:51:46+00 2022-04-23 08:51:46+00 2 8 +COPY zulip.zerver_userpresence (id, last_connected_time, last_active_time, realm_id, user_profile_id, last_update_id) FROM stdin; +1 2024-08-02 09:02:28+00 2024-08-02 09:02:28+00 2 8 3 \. @@ -5899,15 +5091,15 @@ COPY zulip.zerver_userpresence (id, last_connected_time, last_active_time, realm -- Data for Name: zerver_userprofile; Type: TABLE DATA; Schema: zulip; Owner: zulip -- -COPY zulip.zerver_userprofile (id, password, last_login, is_superuser, email, is_staff, is_active, is_bot, date_joined, is_mirror_dummy, full_name, api_key, enable_stream_desktop_notifications, enable_stream_audible_notifications, enable_desktop_notifications, enable_sounds, enable_offline_email_notifications, enable_offline_push_notifications, enable_digest_emails, last_reminder, rate_limits, default_all_public_streams, enter_sends, twenty_four_hour_time, avatar_source, tutorial_status, onboarding_steps, bot_owner_id, default_events_register_stream_id, default_sending_stream_id, realm_id, left_side_userlist, can_forge_sender, bot_type, default_language, tos_version, enable_online_push_notifications, pm_content_in_desktop_notifications, avatar_version, timezone, emojiset, last_active_message_id, long_term_idle, high_contrast_mode, enable_stream_push_notifications, enable_stream_email_notifications, translate_emoticons, message_content_in_email_notifications, dense_mode, delivery_email, starred_message_counts, is_billing_admin, enable_login_emails, notification_sound, fluid_layout_width, demote_inactive_streams, avatar_hash, desktop_icon_count_display, role, wildcard_mentions_notify, recipient_id, presence_enabled, zoom_token, color_scheme, can_create_users, web_home_view, enable_marketing_emails, email_notifications_batching_period_seconds, enable_drafts_synchronization, send_private_typing_notifications, send_stream_typing_notifications, send_read_receipts, web_escape_navigates_to_home_view, uuid, display_emoji_reaction_users, user_list_style, email_address_visibility, realm_name_in_email_notifications_policy, web_mark_read_on_scroll_policy, enable_followed_topic_audible_notifications, enable_followed_topic_desktop_notifications, enable_followed_topic_email_notifications, enable_followed_topic_push_notifications, enable_followed_topic_wildcard_mentions_notify, web_stream_unreads_count_display_policy, automatically_follow_topics_policy, automatically_unmute_topics_in_muted_streams_policy, automatically_follow_topics_where_mentioned) FROM stdin; -2 !1AwW0LFTkP1PYjZNnpG6gTUYsjjftwaBSw1Y3pji 2022-04-23 08:50:54.677875+00 f nagios-receive-bot@zulip.com f t t 2022-04-23 08:50:54.677875+00 f Nagios Receive Bot nTG8r6uvvJGKdQ3tV4NsxO9jZSCV1gXj f f t t t t t \N f t f G F [] 2 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t t nagios-receive-bot@zulip.com t f t zulip f 1 \N 1 400 t 2 t \N 1 f recent_topics t 120 t t t t t 289855e5-91b4-4845-b01a-78406555b931 t 2 1 1 1 t t t t t 2 3 2 t -3 !ff2cIWnT6MjrPBpFSVtvcCxwwZzNVhmeepcp4pnI 2022-04-23 08:50:54.67837+00 f nagios-send-bot@zulip.com f t t 2022-04-23 08:50:54.67837+00 f Nagios Send Bot mw1VGjZT3zeQ17El1sywsemzYPzUyYSt f f t t t t t \N f t f G F [] 3 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t t nagios-send-bot@zulip.com t f t zulip f 1 \N 1 400 t 3 t \N 1 f recent_topics t 120 t t t t t 60274dc7-ae4a-4cd4-aa11-4e177ad780e3 t 2 1 1 1 t t t t t 2 3 2 t -4 !NggBYBvz38U1RnOrZtf3sQ40EaN4LBg7tIwDc0R6 2022-04-23 08:50:54.678796+00 f nagios-staging-receive-bot@zulip.com f t t 2022-04-23 08:50:54.678796+00 f Nagios Staging Receive Bot eS5XwAqTjUTpUw2v7s3pVowhNIn07HOu f f t t t t t \N f t f G F [] 4 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t t nagios-staging-receive-bot@zulip.com t f t zulip f 1 \N 1 400 t 4 t \N 1 f recent_topics t 120 t t t t t e2ab3224-ad6c-4fc9-b323-a44dc5918e18 t 2 1 1 1 t t t t t 2 3 2 t -5 !7R52jbBS4vVwKOWdXqhOICksp9jNnUpGxbgoD5AP 2022-04-23 08:50:54.679357+00 f nagios-staging-send-bot@zulip.com f t t 2022-04-23 08:50:54.679357+00 f Nagios Staging Send Bot pGlFFp5w5w9aBLAk06PXtKr0AkcRDHrQ f f t t t t t \N f t f G F [] 5 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t t nagios-staging-send-bot@zulip.com t f t zulip f 1 \N 1 400 t 5 t \N 1 f recent_topics t 120 t t t t t 5623963e-64d6-494e-b7d6-7408232916a2 t 2 1 1 1 t t t t t 2 3 2 t -6 !F3iJjkzRFqkbnJkl08GayNQ9t7GpUGD4lQ4U0JMc 2022-04-23 08:50:54.680045+00 f notification-bot@zulip.com f t t 2022-04-23 08:50:54.680045+00 f Notification Bot 9W6kY8jUdnsFFauTtsKsHJr6Z74xg8Al f f t t t t t \N f t f G F [] 6 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t t notification-bot@zulip.com t f t zulip f 1 \N 1 400 t 6 t \N 1 f recent_topics t 120 t t t t t 12e9f3dd-03aa-471d-9a3f-a0dbe1f2efb4 t 2 1 1 1 t t t t t 2 3 2 t -7 !oqgN6KFWZxwfI3O1JKFvXdxXCReo6OgcYgAAB5Al 2022-04-23 08:50:54.680469+00 f welcome-bot@zulip.com f t t 2022-04-23 08:50:54.680469+00 f Welcome Bot 9yEPZTOPbO6k7UHwrHMmHQjEYRD5MtHw f f t t t t t \N f t f G F [] 7 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t t welcome-bot@zulip.com t f t zulip f 1 \N 1 400 t 7 t \N 1 f recent_topics t 120 t t t t t fcab4980-2a19-4374-a082-6f017554e060 t 2 1 1 1 t t t t t 2 3 2 t -1 !rxck8AsPDDQDFqVPjn0jmIRLqgWBzlSgoN54f9OB 2022-04-23 08:50:54.676975+00 f emailgateway@zulip.com f t t 2022-04-23 08:50:54.676975+00 f Email Gateway xJ0BENMQQtlU6sMFqhzKwZ7bMVABxY2q f f t t t t t \N f t f G F [] 1 \N \N 1 f t 1 en \N t t 1 google \N f f f f f t t emailgateway@zulip.com t f t zulip f 1 \N 1 400 t 1 t \N 1 f recent_topics t 120 t t t t t 8b6d6cee-47f5-4551-bc1f-f334cd24a4a6 t 2 1 1 1 t t t t t 2 3 2 t -8 argon2$argon2id$v=19$m=102400,t=2,p=8$VjFZUWpPTllFdDVESEg4SkdCbEc5ZQ$m+ST6Xde1vvG3CEgsll1qSL2dVKf1fFFGiQvqWcsI9s 2022-04-23 08:50:55.636819+00 f test@test.com f t f 2022-04-23 08:50:55.05282+00 f tester lDxDG5uoqwOhCdeA2d9iHvboTYAcOlVb f f t t t t t \N f f f G S [] \N \N \N 2 f f \N en \N t t 1 Europe/London google \N f f f f f t t test@test.com t f t zulip f 1 \N 1 100 t 10 t \N 1 t recent_topics f 120 t t t t t 6f58568b-d24c-4400-86a5-2c89c327d275 t 2 1 1 1 t t t t t 2 3 2 t +COPY zulip.zerver_userprofile (id, password, last_login, is_superuser, email, is_staff, is_active, is_bot, date_joined, is_mirror_dummy, full_name, api_key, enable_stream_desktop_notifications, enable_stream_audible_notifications, enable_desktop_notifications, enable_sounds, enable_offline_email_notifications, enable_offline_push_notifications, enable_digest_emails, last_reminder, rate_limits, default_all_public_streams, enter_sends, twenty_four_hour_time, avatar_source, tutorial_status, bot_owner_id, default_events_register_stream_id, default_sending_stream_id, realm_id, left_side_userlist, can_forge_sender, bot_type, default_language, tos_version, enable_online_push_notifications, pm_content_in_desktop_notifications, avatar_version, timezone, emojiset, last_active_message_id, long_term_idle, high_contrast_mode, enable_stream_push_notifications, enable_stream_email_notifications, translate_emoticons, message_content_in_email_notifications, dense_mode, delivery_email, starred_message_counts, is_billing_admin, enable_login_emails, notification_sound, fluid_layout_width, demote_inactive_streams, avatar_hash, desktop_icon_count_display, role, wildcard_mentions_notify, recipient_id, presence_enabled, zoom_token, color_scheme, can_create_users, web_home_view, enable_marketing_emails, email_notifications_batching_period_seconds, enable_drafts_synchronization, send_private_typing_notifications, send_stream_typing_notifications, send_read_receipts, web_escape_navigates_to_home_view, uuid, display_emoji_reaction_users, user_list_style, email_address_visibility, realm_name_in_email_notifications_policy, web_mark_read_on_scroll_policy, enable_followed_topic_audible_notifications, enable_followed_topic_desktop_notifications, enable_followed_topic_email_notifications, enable_followed_topic_push_notifications, enable_followed_topic_wildcard_mentions_notify, web_stream_unreads_count_display_policy, automatically_follow_topics_policy, automatically_unmute_topics_in_muted_streams_policy, automatically_follow_topics_where_mentioned, web_font_size_px, web_line_height_percent, receives_typing_notifications, web_navigate_to_sent_message, web_channel_default_view, web_animate_image_previews) FROM stdin; +2 !W90lSYcJcynQbTMfSfggruHZQ04mo3dsRiNbcnE0 2024-08-02 09:00:26.652263+00 f nagios-receive-bot@zulip.com f t t 2024-08-02 09:00:26.652263+00 f Nagios Receive Bot 2g2pV6R1aIlbGsqPJoxpUc2Uh5h4EcDv f f t t t t t \N f f f G F 2 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t f nagios-receive-bot@zulip.com t f t zulip f 1 \N 1 400 t 2 t \N 1 f inbox t 120 t t t t t 065b4ebb-62d7-4e4a-b294-c53f45f01074 t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +3 !B4NpGKWd0MoWqysrI5WmtzCcZEEkSclJpDstGtQY 2024-08-02 09:00:26.652425+00 f nagios-send-bot@zulip.com f t t 2024-08-02 09:00:26.652425+00 f Nagios Send Bot i2P0bt503MxGT2ob8YMZjqKq28Q81URJ f f t t t t t \N f f f G F 3 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t f nagios-send-bot@zulip.com t f t zulip f 1 \N 1 400 t 3 t \N 1 f inbox t 120 t t t t t c2905c5b-a64d-4e49-93a1-77879a2884c3 t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +4 !jjf5ZeFIynHoTNkE13mvgPk2tEPgAaSFtXUz8LlX 2024-08-02 09:00:26.65259+00 f nagios-staging-receive-bot@zulip.com f t t 2024-08-02 09:00:26.65259+00 f Nagios Staging Receive Bot 2TPYm90iUvc7PAuQVZDRkPTpxnR0iSEH f f t t t t t \N f f f G F 4 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t f nagios-staging-receive-bot@zulip.com t f t zulip f 1 \N 1 400 t 4 t \N 1 f inbox t 120 t t t t t cc1c2bf3-0453-4675-b2e8-fd6c38a589c8 t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +5 !9L156I8NyhmLinuSeiEORJUc5GM7xxYn0wTEbRmc 2024-08-02 09:00:26.652751+00 f nagios-staging-send-bot@zulip.com f t t 2024-08-02 09:00:26.652751+00 f Nagios Staging Send Bot CJLwUAGfYubvlwlhZpFQVcR4jzS6UbKP f f t t t t t \N f f f G F 5 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t f nagios-staging-send-bot@zulip.com t f t zulip f 1 \N 1 400 t 5 t \N 1 f inbox t 120 t t t t t a659cc77-69d7-4d1b-ba5c-31a12e11714b t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +6 !y6ZCsINgLj7e22g8wdR2w17MLaPlbjKJ6h4f1pcR 2024-08-02 09:00:26.652896+00 f notification-bot@zulip.com f t t 2024-08-02 09:00:26.652896+00 f Notification Bot G2QTeUSDDJqAPnS6lbyiy1ZDPdFcYQZi f f t t t t t \N f f f G F 6 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t f notification-bot@zulip.com t f t zulip f 1 \N 1 400 t 6 t \N 1 f inbox t 120 t t t t t 723c8c74-1f40-476b-a87c-e4527b0afe5e t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +7 !fbANbcjs1JvJkMjy2B4R2kAMF3YzWlQkUZDu3i04 2024-08-02 09:00:26.653052+00 f welcome-bot@zulip.com f t t 2024-08-02 09:00:26.653052+00 f Welcome Bot O7hIFsam401BehTGoXjHF7NFNnj3KDSI f f t t t t t \N f f f G F 7 \N \N 1 f f 1 en \N t t 1 google \N f f f f f t f welcome-bot@zulip.com t f t zulip f 1 \N 1 400 t 7 t \N 1 f inbox t 120 t t t t t 1fa93e5c-a4c5-4210-bdd6-cac644c4e4a6 t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +1 !7USL7q9vJl2YVFryK6nm7D5arK3uyNxNG2i2Vtrt 2024-08-02 09:00:26.651917+00 f emailgateway@zulip.com f t t 2024-08-02 09:00:26.651917+00 f Email Gateway V1rRs9IizR1o7JotRRGfhPzg17DgcZUX f f t t t t t \N f f f G F 1 \N \N 1 f t 1 en \N t t 1 google \N f f f f f t f emailgateway@zulip.com t f t zulip f 1 \N 1 400 t 1 t \N 1 f inbox t 120 t t t t t 16cab76d-a60c-4186-81bd-371bd581c0f9 t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover +8 argon2$argon2id$v=19$m=102400,t=2,p=8$ZnJTd0lkc1J4RDU4OVhwcnZUZER3Nw$z7CTdwm0tEjfzWAPPKaPNC6R1DFxFd5N4xNI4+8CK+Q 2024-08-02 09:00:27.11103+00 t test@test.com f t f 2024-08-02 09:00:26.769576+00 f tester 4BC7m7srjklLX6yBRy66IvZcJ32jW28z f f t t t t t \N f f f G S \N \N \N 2 f f \N en-gb \N t t 1 Europe/London google \N f f f f f t f test@test.com t f t zulip f 1 \N 1 100 t 11 t \N 1 t inbox f 120 t t t t t 4f2c8447-4c17-4411-8e87-8f82e20a9857 t 2 1 1 1 t t t t t 2 3 2 t 16 140 t t 1 on_hover \. @@ -5961,7 +5153,7 @@ SELECT pg_catalog.setval('zulip.analytics_installationcount_id_seq', 1, false); -- Name: analytics_realmcount_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.analytics_realmcount_id_seq', 1, true); +SELECT pg_catalog.setval('zulip.analytics_realmcount_id_seq', 1, false); -- @@ -5996,7 +5188,7 @@ SELECT pg_catalog.setval('zulip.auth_group_permissions_id_seq', 1, false); -- Name: auth_permission_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.auth_permission_id_seq', 308, true); +SELECT pg_catalog.setval('zulip.auth_permission_id_seq', 312, true); -- @@ -6017,21 +5209,21 @@ SELECT pg_catalog.setval('zulip.confirmation_realmcreationkey_id_seq', 1, true); -- Name: django_content_type_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.django_content_type_id_seq', 77, true); +SELECT pg_catalog.setval('zulip.django_content_type_id_seq', 78, true); -- -- Name: django_migrations_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.django_migrations_id_seq', 552, true); +SELECT pg_catalog.setval('zulip.django_migrations_id_seq', 624, true); -- -- Name: fts_update_log_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.fts_update_log_id_seq', 5, true); +SELECT pg_catalog.setval('zulip.fts_update_log_id_seq', 13, true); -- @@ -6213,7 +5405,7 @@ SELECT pg_catalog.setval('zulip.zerver_customprofilefieldvalue_id_seq', 1, false -- Name: zerver_defaultstream_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_defaultstream_id_seq', 1, true); +SELECT pg_catalog.setval('zulip.zerver_defaultstream_id_seq', 3, true); -- @@ -6258,11 +5450,18 @@ SELECT pg_catalog.setval('zulip.zerver_groupgroupmembership_id_seq', 12, true); SELECT pg_catalog.setval('zulip.zerver_huddle_id_seq', 1, false); +-- +-- Name: zerver_imageattachment_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip +-- + +SELECT pg_catalog.setval('zulip.zerver_imageattachment_id_seq', 1, false); + + -- -- Name: zerver_message_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_message_id_seq', 5, true); +SELECT pg_catalog.setval('zulip.zerver_message_id_seq', 13, true); -- @@ -6304,21 +5503,28 @@ SELECT pg_catalog.setval('zulip.zerver_muteduser_id_seq', 1, false); -- Name: zerver_onboardingstep_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_onboardingstep_id_seq', 1, false); +SELECT pg_catalog.setval('zulip.zerver_onboardingstep_id_seq', 1, true); + + +-- +-- Name: zerver_onboardingusermessage_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip +-- + +SELECT pg_catalog.setval('zulip.zerver_onboardingusermessage_id_seq', 12, true); -- -- Name: zerver_preregistrationrealm_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_preregistrationrealm_id_seq', 1, false); +SELECT pg_catalog.setval('zulip.zerver_preregistrationrealm_id_seq', 1, true); -- -- Name: zerver_preregistrationuser_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_preregistrationuser_id_seq', 1, true); +SELECT pg_catalog.setval('zulip.zerver_preregistrationuser_id_seq', 1, false); -- @@ -6328,6 +5534,13 @@ SELECT pg_catalog.setval('zulip.zerver_preregistrationuser_id_seq', 1, true); SELECT pg_catalog.setval('zulip.zerver_preregistrationuser_streams_id_seq', 1, false); +-- +-- Name: zerver_presencesequence_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip +-- + +SELECT pg_catalog.setval('zulip.zerver_presencesequence_id_seq', 2, true); + + -- -- Name: zerver_pushdevicetoken_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- @@ -6360,7 +5573,7 @@ SELECT pg_catalog.setval('zulip.zerver_realmalias_id_seq', 1, false); -- Name: zerver_realmauditlog_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_realmauditlog_id_seq', 14, true); +SELECT pg_catalog.setval('zulip.zerver_realmauditlog_id_seq', 71, true); -- @@ -6409,21 +5622,21 @@ SELECT pg_catalog.setval('zulip.zerver_realmuserdefault_id_seq', 2, true); -- Name: zerver_recipient_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_recipient_id_seq', 10, true); +SELECT pg_catalog.setval('zulip.zerver_recipient_id_seq', 11, true); -- -- Name: zerver_scheduledemail_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_scheduledemail_id_seq', 2, true); +SELECT pg_catalog.setval('zulip.zerver_scheduledemail_id_seq', 4, true); -- -- Name: zerver_scheduledemail_users_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_scheduledemail_users_id_seq', 2, true); +SELECT pg_catalog.setval('zulip.zerver_scheduledemail_users_id_seq', 4, true); -- @@ -6437,7 +5650,7 @@ SELECT pg_catalog.setval('zulip.zerver_scheduledmessage_id_seq', 1, false); -- Name: zerver_scheduledmessagenotificationemail_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_scheduledmessagenotificationemail_id_seq', 1, true); +SELECT pg_catalog.setval('zulip.zerver_scheduledmessagenotificationemail_id_seq', 1, false); -- @@ -6451,7 +5664,7 @@ SELECT pg_catalog.setval('zulip.zerver_service_id_seq', 1, false); -- Name: zerver_stream_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_stream_id_seq', 2, true); +SELECT pg_catalog.setval('zulip.zerver_stream_id_seq', 3, true); -- @@ -6465,14 +5678,14 @@ SELECT pg_catalog.setval('zulip.zerver_submessage_id_seq', 1, false); -- Name: zerver_subscription_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_subscription_id_seq', 10, true); +SELECT pg_catalog.setval('zulip.zerver_subscription_id_seq', 11, true); -- -- Name: zerver_useractivity_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_useractivity_id_seq', 9, true); +SELECT pg_catalog.setval('zulip.zerver_useractivity_id_seq', 14, true); -- @@ -6500,7 +5713,7 @@ SELECT pg_catalog.setval('zulip.zerver_usergroupmembership_id_seq', 15, true); -- Name: zerver_usermessage_id_seq; Type: SEQUENCE SET; Schema: zulip; Owner: zulip -- -SELECT pg_catalog.setval('zulip.zerver_usermessage_id_seq', 6, true); +SELECT pg_catalog.setval('zulip.zerver_usermessage_id_seq', 14, true); -- @@ -7138,6 +6351,22 @@ ALTER TABLE ONLY zulip.zerver_huddle ADD CONSTRAINT zerver_huddle_pkey PRIMARY KEY (id); +-- +-- Name: zerver_imageattachment zerver_imageattachment_path_id_key; Type: CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_imageattachment + ADD CONSTRAINT zerver_imageattachment_path_id_key UNIQUE (path_id); + + +-- +-- Name: zerver_imageattachment zerver_imageattachment_pkey; Type: CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_imageattachment + ADD CONSTRAINT zerver_imageattachment_pkey PRIMARY KEY (id); + + -- -- Name: zerver_message zerver_message_pkey; Type: CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -7210,6 +6439,22 @@ ALTER TABLE ONLY zulip.zerver_muteduser ADD CONSTRAINT zerver_muteduser_user_profile_id_muted_user_id_5bfc6940_uniq UNIQUE (user_profile_id, muted_user_id); +-- +-- Name: zerver_namedusergroup zerver_namedusergroup_pkey; Type: CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_namedusergroup + ADD CONSTRAINT zerver_namedusergroup_pkey PRIMARY KEY (usergroup_ptr_id); + + +-- +-- Name: zerver_namedusergroup zerver_namedusergroup_realm_id_name_419247c4_uniq; Type: CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_namedusergroup + ADD CONSTRAINT zerver_namedusergroup_realm_id_name_419247c4_uniq UNIQUE (realm_id, name); + + -- -- Name: zerver_onboardingstep zerver_onboardingstep_id_45d37e68_pk; Type: CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -7226,6 +6471,14 @@ ALTER TABLE ONLY zulip.zerver_onboardingstep ADD CONSTRAINT zerver_onboardingstep_user_id_onboarding_step_82524e0a_uniq UNIQUE (user_id, onboarding_step); +-- +-- Name: zerver_onboardingusermessage zerver_onboardingusermessage_pkey; Type: CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_onboardingusermessage + ADD CONSTRAINT zerver_onboardingusermessage_pkey PRIMARY KEY (id); + + -- -- Name: zerver_preregistrationrealm zerver_preregistrationrealm_pkey; Type: CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -7258,6 +6511,22 @@ ALTER TABLE ONLY zulip.zerver_preregistrationuser_streams ADD CONSTRAINT zerver_preregistrationuser_streams_pkey PRIMARY KEY (id); +-- +-- Name: zerver_presencesequence zerver_presencesequence_pkey; Type: CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_presencesequence + ADD CONSTRAINT zerver_presencesequence_pkey PRIMARY KEY (id); + + +-- +-- Name: zerver_presencesequence zerver_presencesequence_realm_id_key; Type: CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_presencesequence + ADD CONSTRAINT zerver_presencesequence_realm_id_key UNIQUE (realm_id); + + -- -- Name: zerver_pushdevicetoken zerver_pushdevicetoken_pkey; Type: CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -7554,14 +6823,6 @@ ALTER TABLE ONLY zulip.zerver_usergroup ADD CONSTRAINT zerver_usergroup_pkey PRIMARY KEY (id); --- --- Name: zerver_usergroup zerver_usergroup_realm_id_name_951f766d_uniq; Type: CONSTRAINT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_usergroup - ADD CONSTRAINT zerver_usergroup_realm_id_name_951f766d_uniq UNIQUE (realm_id, name); - - -- -- Name: zerver_usergroupmembership zerver_usergroupmembersh_user_group_id_user_profi_5b32ea4b_uniq; Type: CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -8256,6 +7517,13 @@ CREATE INDEX zerver_archivetransaction_realm_id_81a3b8dd ON zulip.zerver_archive CREATE INDEX zerver_archivetransaction_restored_caf08584 ON zulip.zerver_archivetransaction USING btree (restored); +-- +-- Name: zerver_archivetransaction_restored_timestamp_7bf02066; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_archivetransaction_restored_timestamp_7bf02066 ON zulip.zerver_archivetransaction USING btree (restored_timestamp); + + -- -- Name: zerver_archivetransaction_timestamp_95500014; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -8312,6 +7580,13 @@ CREATE INDEX zerver_attachment_owner_id_b40072c4 ON zulip.zerver_attachment USIN CREATE INDEX zerver_attachment_path_id_eb61103a_like ON zulip.zerver_attachment USING btree (path_id text_pattern_ops); +-- +-- Name: zerver_attachment_realm_create_time; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_attachment_realm_create_time ON zulip.zerver_attachment USING btree (realm_id, create_time); + + -- -- Name: zerver_attachment_realm_id_f8e3c906; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -8516,17 +7791,31 @@ CREATE INDEX zerver_groupgroupmembership_supergroup_id_3874b6ef ON zulip.zerver_ -- --- Name: zerver_huddle_huddle_hash_085f5549_like; Type: INDEX; Schema: zulip; Owner: zulip +-- Name: zerver_huddle_huddle_hash_085f5549_like; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_huddle_huddle_hash_085f5549_like ON zulip.zerver_huddle USING btree (huddle_hash varchar_pattern_ops); + + +-- +-- Name: zerver_huddle_recipient_id_e3e1fadc; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_huddle_recipient_id_e3e1fadc ON zulip.zerver_huddle USING btree (recipient_id); + + +-- +-- Name: zerver_imageattachment_path_id_0fbe468e_like; Type: INDEX; Schema: zulip; Owner: zulip -- -CREATE INDEX zerver_huddle_huddle_hash_085f5549_like ON zulip.zerver_huddle USING btree (huddle_hash varchar_pattern_ops); +CREATE INDEX zerver_imageattachment_path_id_0fbe468e_like ON zulip.zerver_imageattachment USING btree (path_id text_pattern_ops); -- --- Name: zerver_huddle_recipient_id_e3e1fadc; Type: INDEX; Schema: zulip; Owner: zulip +-- Name: zerver_imageattachment_realm_id_297cef1f; Type: INDEX; Schema: zulip; Owner: zulip -- -CREATE INDEX zerver_huddle_recipient_id_e3e1fadc ON zulip.zerver_huddle USING btree (recipient_id); +CREATE INDEX zerver_imageattachment_realm_id_297cef1f ON zulip.zerver_imageattachment USING btree (realm_id); -- @@ -8767,6 +8056,20 @@ CREATE INDEX zerver_muteduser_muted_user_id_d4b66dff ON zulip.zerver_muteduser U CREATE INDEX zerver_muteduser_user_profile_id_aeb57a40 ON zulip.zerver_muteduser USING btree (user_profile_id); +-- +-- Name: zerver_namedusergroup_can_mention_group_id_39bf278e; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_namedusergroup_can_mention_group_id_39bf278e ON zulip.zerver_namedusergroup USING btree (can_mention_group_id); + + +-- +-- Name: zerver_namedusergroup_realm_id_f1b966ff; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_namedusergroup_realm_id_f1b966ff ON zulip.zerver_namedusergroup USING btree (realm_id); + + -- -- Name: zerver_onboardingstep_user_id_3ced3a3a; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -8774,6 +8077,20 @@ CREATE INDEX zerver_muteduser_user_profile_id_aeb57a40 ON zulip.zerver_muteduser CREATE INDEX zerver_onboardingstep_user_id_3ced3a3a ON zulip.zerver_onboardingstep USING btree (user_id); +-- +-- Name: zerver_onboardingusermessage_message_id_ec6c709e; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_onboardingusermessage_message_id_ec6c709e ON zulip.zerver_onboardingusermessage USING btree (message_id); + + +-- +-- Name: zerver_onboardingusermessage_realm_id_ef89682e; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_onboardingusermessage_realm_id_ef89682e ON zulip.zerver_onboardingusermessage USING btree (realm_id); + + -- -- Name: zerver_preregistrationrealm_created_realm_id_0c7c7c75; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -8872,6 +8189,20 @@ CREATE INDEX zerver_reaction_user_profile_id_468ce1ef ON zulip.zerver_reaction U CREATE INDEX zerver_realm_can_access_all_users_group_id_692c7cc6 ON zulip.zerver_realm USING btree (can_access_all_users_group_id); +-- +-- Name: zerver_realm_can_create_private_channel_group_id_ba294d86; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_realm_can_create_private_channel_group_id_ba294d86 ON zulip.zerver_realm USING btree (can_create_private_channel_group_id); + + +-- +-- Name: zerver_realm_can_create_public_channel_group_id_6eb35b68; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_realm_can_create_public_channel_group_id_6eb35b68 ON zulip.zerver_realm USING btree (can_create_public_channel_group_id); + + -- -- Name: zerver_realm_create_multiuse_invite_group_id_28a8b9cb; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -8879,11 +8210,25 @@ CREATE INDEX zerver_realm_can_access_all_users_group_id_692c7cc6 ON zulip.zerver CREATE INDEX zerver_realm_create_multiuse_invite_group_id_28a8b9cb ON zulip.zerver_realm USING btree (create_multiuse_invite_group_id); +-- +-- Name: zerver_realm_direct_message_initiator_group_id_e7f0ea74; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_realm_direct_message_initiator_group_id_e7f0ea74 ON zulip.zerver_realm USING btree (direct_message_initiator_group_id); + + +-- +-- Name: zerver_realm_direct_message_permission_group_id_df6cc218; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_realm_direct_message_permission_group_id_df6cc218 ON zulip.zerver_realm USING btree (direct_message_permission_group_id); + + -- -- Name: zerver_realm_notifications_stream_id_f07609e9; Type: INDEX; Schema: zulip; Owner: zulip -- -CREATE INDEX zerver_realm_notifications_stream_id_f07609e9 ON zulip.zerver_realm USING btree (notifications_stream_id); +CREATE INDEX zerver_realm_notifications_stream_id_f07609e9 ON zulip.zerver_realm USING btree (new_stream_announcements_stream_id); -- @@ -8897,7 +8242,7 @@ CREATE INDEX zerver_realm_push_notifications_enabled_f806b849 ON zulip.zerver_re -- Name: zerver_realm_signup_notifications_stream_id_1e735af4; Type: INDEX; Schema: zulip; Owner: zulip -- -CREATE INDEX zerver_realm_signup_notifications_stream_id_1e735af4 ON zulip.zerver_realm USING btree (signup_notifications_stream_id); +CREATE INDEX zerver_realm_signup_notifications_stream_id_1e735af4 ON zulip.zerver_realm USING btree (signup_announcements_stream_id); -- @@ -8921,6 +8266,13 @@ CREATE INDEX zerver_realm_unsent_scheduled_messages_by_user ON zulip.zerver_sche CREATE INDEX zerver_realm_want_advertise_in_communities_directory_0776d2a9 ON zulip.zerver_realm USING btree (want_advertise_in_communities_directory); +-- +-- Name: zerver_realm_zulip_update_announcements_stream_id_b7809c68; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_realm_zulip_update_announcements_stream_id_b7809c68 ON zulip.zerver_realm USING btree (zulip_update_announcements_stream_id); + + -- -- Name: zerver_realmalias_domain_6f7958a4; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -8977,6 +8329,13 @@ CREATE INDEX zerver_realmauditlog_modified_user_group_id_56329312 ON zulip.zerve CREATE INDEX zerver_realmauditlog_modified_user_id_fa063d3c ON zulip.zerver_realmauditlog USING btree (modified_user_id); +-- +-- Name: zerver_realmauditlog_realm__event_type__event_time; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_realmauditlog_realm__event_type__event_time ON zulip.zerver_realmauditlog USING btree (realm_id, event_type, event_time); + + -- -- Name: zerver_realmauditlog_realm_id_7d25fe8b; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -8984,6 +8343,13 @@ CREATE INDEX zerver_realmauditlog_modified_user_id_fa063d3c ON zulip.zerver_real CREATE INDEX zerver_realmauditlog_realm_id_7d25fe8b ON zulip.zerver_realmauditlog USING btree (realm_id); +-- +-- Name: zerver_realmauditlog_user_activations_idx; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_realmauditlog_user_activations_idx ON zulip.zerver_realmauditlog USING btree (modified_user_id, event_time) WHERE (event_type = ANY (ARRAY[101, 102, 103, 104])); + + -- -- Name: zerver_realmauditlog_user_subscriptions_idx; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -9229,6 +8595,13 @@ CREATE INDEX zerver_service_user_profile_id_111b0c49 ON zulip.zerver_service USI CREATE INDEX zerver_stream_can_remove_subscribers_group_id_ce4fe4b7 ON zulip.zerver_stream USING btree (can_remove_subscribers_group_id); +-- +-- Name: zerver_stream_creator_id_65aeba7e; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_stream_creator_id_65aeba7e ON zulip.zerver_stream USING btree (creator_id); + + -- -- Name: zerver_stream_email_token_8a608bf8_like; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -9376,13 +8749,6 @@ CREATE INDEX zerver_useractivityinterval_user_profile_id_634623af ON zulip.zerve CREATE INDEX zerver_useractivityinterval_user_profile_id_end_bb3bfc37_idx ON zulip.zerver_useractivityinterval USING btree (user_profile_id, "end"); --- --- Name: zerver_usergroup_can_mention_group_id_3f5cd6cd; Type: INDEX; Schema: zulip; Owner: zulip --- - -CREATE INDEX zerver_usergroup_can_mention_group_id_3f5cd6cd ON zulip.zerver_usergroup USING btree (can_mention_group_id); - - -- -- Name: zerver_usergroup_realm_id_8b78d3b3; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -9488,6 +8854,13 @@ CREATE INDEX zerver_userpresence_last_active_time_208e334b ON zulip.zerver_userp CREATE INDEX zerver_userpresence_last_connected_time_19294af2 ON zulip.zerver_userpresence USING btree (last_connected_time); +-- +-- Name: zerver_userpresence_last_update_id_63c97509; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_userpresence_last_update_id_63c97509 ON zulip.zerver_userpresence USING btree (last_update_id); + + -- -- Name: zerver_userpresence_realm_id_5c4ef5a9; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -9509,6 +8882,13 @@ CREATE INDEX zerver_userpresence_realm_id_last_active_time_1c5aa9a2_idx ON zulip CREATE INDEX zerver_userpresence_realm_id_last_connected_time_98d2fc9f_idx ON zulip.zerver_userpresence USING btree (realm_id, last_connected_time); +-- +-- Name: zerver_userpresence_realm_last_update_id_idx; Type: INDEX; Schema: zulip; Owner: zulip +-- + +CREATE INDEX zerver_userpresence_realm_last_update_id_idx ON zulip.zerver_userpresence USING btree (realm_id, last_update_id); + + -- -- Name: zerver_userprofile_api_key_63599ac6_like; Type: INDEX; Schema: zulip; Owner: zulip -- @@ -9747,11 +9127,11 @@ ALTER TABLE ONLY zulip.analytics_streamcount -- --- Name: analytics_streamcount analytics_streamcount_stream_id_e1168935_fk_zerver_stream_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: analytics_streamcount analytics_streamcount_stream_id_e1168935_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.analytics_streamcount - ADD CONSTRAINT analytics_streamcount_stream_id_e1168935_fk_zerver_stream_id FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT analytics_streamcount_stream_id_e1168935_fk FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -9866,14 +9246,6 @@ ALTER TABLE ONLY zulip.zerver_alertword ADD CONSTRAINT zerver_alertword_user_profile_id_03150ab2_fk_zerver_us FOREIGN KEY (user_profile_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; --- --- Name: zerver_archivedattachment_messages zerver_archivedattac_archivedattachment_i_1b7d6694_fk_zerver_ar; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_archivedattachment_messages - ADD CONSTRAINT zerver_archivedattac_archivedattachment_i_1b7d6694_fk_zerver_ar FOREIGN KEY (archivedattachment_id) REFERENCES zulip.zerver_archivedattachment(id) DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: zerver_archivedattachment_messages zerver_archivedattac_archivedmessage_id_e67eb490_fk_zerver_ar; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -9891,19 +9263,19 @@ ALTER TABLE ONLY zulip.zerver_archivedattachment -- --- Name: zerver_archivedattachment zerver_archivedattachment_realm_id_95fb78cc_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_archivedattachment_messages zerver_archivedattachment_archivedattachment_id_1b7d6694_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_archivedattachment - ADD CONSTRAINT zerver_archivedattachment_realm_id_95fb78cc_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_archivedattachment_messages + ADD CONSTRAINT zerver_archivedattachment_archivedattachment_id_1b7d6694_fk FOREIGN KEY (archivedattachment_id) REFERENCES zulip.zerver_archivedattachment(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_archivedmessage zerver_archivedmessa_archive_transaction__3f0a7f7b_fk_zerver_ar; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_archivedattachment zerver_archivedattachment_realm_id_95fb78cc_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_archivedmessage - ADD CONSTRAINT zerver_archivedmessa_archive_transaction__3f0a7f7b_fk_zerver_ar FOREIGN KEY (archive_transaction_id) REFERENCES zulip.zerver_archivetransaction(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_archivedattachment + ADD CONSTRAINT zerver_archivedattachment_realm_id_95fb78cc_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -9930,6 +9302,14 @@ ALTER TABLE ONLY zulip.zerver_archivedmessage ADD CONSTRAINT zerver_archivedmessa_sending_client_id_0f31bdd0_fk_zerver_cl FOREIGN KEY (sending_client_id) REFERENCES zulip.zerver_client(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: zerver_archivedmessage zerver_archivedmessage_archive_transaction_id_3f0a7f7b_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_archivedmessage + ADD CONSTRAINT zerver_archivedmessage_archive_transaction_id_3f0a7f7b_fk FOREIGN KEY (archive_transaction_id) REFERENCES zulip.zerver_archivetransaction(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: zerver_archivedmessage zerver_archivedmessage_realm_id_fab86889_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -9995,19 +9375,19 @@ ALTER TABLE ONLY zulip.zerver_archivetransaction -- --- Name: zerver_attachment_messages zerver_attachment_me_attachment_id_eb4e59c0_fk_zerver_at; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_attachment_messages zerver_attachment_me_message_id_c5e566fb_fk_zerver_me; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_attachment_messages - ADD CONSTRAINT zerver_attachment_me_attachment_id_eb4e59c0_fk_zerver_at FOREIGN KEY (attachment_id) REFERENCES zulip.zerver_attachment(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_attachment_me_message_id_c5e566fb_fk_zerver_me FOREIGN KEY (message_id) REFERENCES zulip.zerver_message(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_attachment_messages zerver_attachment_me_message_id_c5e566fb_fk_zerver_me; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_attachment_messages zerver_attachment_messages_attachment_id_eb4e59c0_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_attachment_messages - ADD CONSTRAINT zerver_attachment_me_message_id_c5e566fb_fk_zerver_me FOREIGN KEY (message_id) REFERENCES zulip.zerver_message(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_attachment_messages_attachment_id_eb4e59c0_fk FOREIGN KEY (attachment_id) REFERENCES zulip.zerver_attachment(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10027,19 +9407,19 @@ ALTER TABLE ONLY zulip.zerver_attachment -- --- Name: zerver_attachment_scheduled_messages zerver_attachment_sc_attachment_id_03da128c_fk_zerver_at; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_attachment_scheduled_messages zerver_attachment_schedul_scheduledmessage_id_27c3f026_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_attachment_scheduled_messages - ADD CONSTRAINT zerver_attachment_sc_attachment_id_03da128c_fk_zerver_at FOREIGN KEY (attachment_id) REFERENCES zulip.zerver_attachment(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_attachment_schedul_scheduledmessage_id_27c3f026_fk FOREIGN KEY (scheduledmessage_id) REFERENCES zulip.zerver_scheduledmessage(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_attachment_scheduled_messages zerver_attachment_sc_scheduledmessage_id_27c3f026_fk_zerver_sc; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_attachment_scheduled_messages zerver_attachment_scheduled_messages_attachment_id_03da128c_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_attachment_scheduled_messages - ADD CONSTRAINT zerver_attachment_sc_scheduledmessage_id_27c3f026_fk_zerver_sc FOREIGN KEY (scheduledmessage_id) REFERENCES zulip.zerver_scheduledmessage(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_attachment_scheduled_messages_attachment_id_03da128c_fk FOREIGN KEY (attachment_id) REFERENCES zulip.zerver_attachment(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10058,14 +9438,6 @@ ALTER TABLE ONLY zulip.zerver_botstoragedata ADD CONSTRAINT zerver_botuserstated_bot_profile_id_861ccb8a_fk_zerver_us FOREIGN KEY (bot_profile_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; --- --- Name: zerver_customprofilefieldvalue zerver_customprofile_field_id_00409129_fk_zerver_cu; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_customprofilefieldvalue - ADD CONSTRAINT zerver_customprofile_field_id_00409129_fk_zerver_cu FOREIGN KEY (field_id) REFERENCES zulip.zerver_customprofilefield(id) DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: zerver_customprofilefieldvalue zerver_customprofile_user_profile_id_24d4820f_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10083,11 +9455,11 @@ ALTER TABLE ONLY zulip.zerver_customprofilefield -- --- Name: zerver_defaultstreamgroup_streams zerver_defaultstream_defaultstreamgroup_i_bd9739b9_fk_zerver_de; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_customprofilefieldvalue zerver_customprofilefieldvalue_field_id_00409129_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_defaultstreamgroup_streams - ADD CONSTRAINT zerver_defaultstream_defaultstreamgroup_i_bd9739b9_fk_zerver_de FOREIGN KEY (defaultstreamgroup_id) REFERENCES zulip.zerver_defaultstreamgroup(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_customprofilefieldvalue + ADD CONSTRAINT zerver_customprofilefieldvalue_field_id_00409129_fk FOREIGN KEY (field_id) REFERENCES zulip.zerver_customprofilefield(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10099,19 +9471,19 @@ ALTER TABLE ONLY zulip.zerver_defaultstream -- --- Name: zerver_defaultstreamgroup_streams zerver_defaultstream_stream_id_9844331d_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_defaultstream zerver_defaultstream_stream_id_9a8e0616_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_defaultstreamgroup_streams - ADD CONSTRAINT zerver_defaultstream_stream_id_9844331d_fk_zerver_st FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_defaultstream + ADD CONSTRAINT zerver_defaultstream_stream_id_9a8e0616_fk FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_defaultstream zerver_defaultstream_stream_id_9a8e0616_fk_zerver_stream_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_defaultstreamgroup_streams zerver_defaultstreamgroup_defaultstreamgroup_id_bd9739b9_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_defaultstream - ADD CONSTRAINT zerver_defaultstream_stream_id_9a8e0616_fk_zerver_stream_id FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_defaultstreamgroup_streams + ADD CONSTRAINT zerver_defaultstreamgroup_defaultstreamgroup_id_bd9739b9_fk FOREIGN KEY (defaultstreamgroup_id) REFERENCES zulip.zerver_defaultstreamgroup(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10122,6 +9494,14 @@ ALTER TABLE ONLY zulip.zerver_defaultstreamgroup ADD CONSTRAINT zerver_defaultstreamgroup_realm_id_b15f3495_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: zerver_defaultstreamgroup_streams zerver_defaultstreamgroup_streams_stream_id_9844331d_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_defaultstreamgroup_streams + ADD CONSTRAINT zerver_defaultstreamgroup_streams_stream_id_9844331d_fk FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: zerver_draft zerver_draft_recipient_id_b9b91732_fk_zerver_recipient_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10155,19 +9535,19 @@ ALTER TABLE ONLY zulip.zerver_emailchangestatus -- --- Name: zerver_groupgroupmembership zerver_groupgroupmem_subgroup_id_3ec521bb_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_groupgroupmembership zerver_groupgroupmembership_subgroup_id_3ec521bb_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_groupgroupmembership - ADD CONSTRAINT zerver_groupgroupmem_subgroup_id_3ec521bb_fk_zerver_us FOREIGN KEY (subgroup_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_groupgroupmembership_subgroup_id_3ec521bb_fk FOREIGN KEY (subgroup_id) REFERENCES zulip.zerver_namedusergroup(usergroup_ptr_id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_groupgroupmembership zerver_groupgroupmem_supergroup_id_3874b6ef_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_groupgroupmembership zerver_groupgroupmembership_supergroup_id_3874b6ef_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_groupgroupmembership - ADD CONSTRAINT zerver_groupgroupmem_supergroup_id_3874b6ef_fk_zerver_us FOREIGN KEY (supergroup_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_groupgroupmembership_supergroup_id_3874b6ef_fk FOREIGN KEY (supergroup_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10178,6 +9558,14 @@ ALTER TABLE ONLY zulip.zerver_huddle ADD CONSTRAINT zerver_huddle_recipient_id_e3e1fadc_fk_zerver_recipient_id FOREIGN KEY (recipient_id) REFERENCES zulip.zerver_recipient(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: zerver_imageattachment zerver_imageattachment_realm_id_297cef1f_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_imageattachment + ADD CONSTRAINT zerver_imageattachment_realm_id_297cef1f_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: zerver_message zerver_message_realm_id_849a39c8_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10227,35 +9615,35 @@ ALTER TABLE ONLY zulip.zerver_missedmessageemailaddress -- --- Name: zerver_multiuseinvite_streams zerver_multiuseinvit_multiuseinvite_id_be033d7f_fk_zerver_mu; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_multiuseinvite zerver_multiuseinvit_referred_by_id_8970bd5c_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_multiuseinvite_streams - ADD CONSTRAINT zerver_multiuseinvit_multiuseinvite_id_be033d7f_fk_zerver_mu FOREIGN KEY (multiuseinvite_id) REFERENCES zulip.zerver_multiuseinvite(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_multiuseinvite + ADD CONSTRAINT zerver_multiuseinvit_referred_by_id_8970bd5c_fk_zerver_us FOREIGN KEY (referred_by_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_multiuseinvite zerver_multiuseinvit_referred_by_id_8970bd5c_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_multiuseinvite zerver_multiuseinvite_realm_id_8eb19d52_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_multiuseinvite - ADD CONSTRAINT zerver_multiuseinvit_referred_by_id_8970bd5c_fk_zerver_us FOREIGN KEY (referred_by_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_multiuseinvite_realm_id_8eb19d52_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_multiuseinvite_streams zerver_multiuseinvit_stream_id_2cb97168_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_multiuseinvite_streams zerver_multiuseinvite_streams_multiuseinvite_id_be033d7f_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_multiuseinvite_streams - ADD CONSTRAINT zerver_multiuseinvit_stream_id_2cb97168_fk_zerver_st FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_multiuseinvite_streams_multiuseinvite_id_be033d7f_fk FOREIGN KEY (multiuseinvite_id) REFERENCES zulip.zerver_multiuseinvite(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_multiuseinvite zerver_multiuseinvite_realm_id_8eb19d52_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_multiuseinvite_streams zerver_multiuseinvite_streams_stream_id_2cb97168_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_multiuseinvite - ADD CONSTRAINT zerver_multiuseinvite_realm_id_8eb19d52_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_multiuseinvite_streams + ADD CONSTRAINT zerver_multiuseinvite_streams_stream_id_2cb97168_fk FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10266,14 +9654,6 @@ ALTER TABLE ONLY zulip.zerver_usertopic ADD CONSTRAINT zerver_mutedtopic_recipient_id_e1901302_fk_zerver_recipient_id FOREIGN KEY (recipient_id) REFERENCES zulip.zerver_recipient(id) DEFERRABLE INITIALLY DEFERRED; --- --- Name: zerver_usertopic zerver_mutedtopic_stream_id_acbff20e_fk_zerver_stream_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_usertopic - ADD CONSTRAINT zerver_mutedtopic_stream_id_acbff20e_fk_zerver_stream_id FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: zerver_usertopic zerver_mutedtopic_user_profile_id_4f8a692c_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10298,6 +9678,30 @@ ALTER TABLE ONLY zulip.zerver_muteduser ADD CONSTRAINT zerver_muteduser_user_profile_id_aeb57a40_fk_zerver_us FOREIGN KEY (user_profile_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: zerver_namedusergroup zerver_namedusergroup_can_mention_group_id_39bf278e_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_namedusergroup + ADD CONSTRAINT zerver_namedusergroup_can_mention_group_id_39bf278e_fk FOREIGN KEY (can_mention_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_namedusergroup zerver_namedusergroup_realm_id_f1b966ff_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_namedusergroup + ADD CONSTRAINT zerver_namedusergroup_realm_id_f1b966ff_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_namedusergroup zerver_namedusergroup_usergroup_ptr_id_684bf3ca_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_namedusergroup + ADD CONSTRAINT zerver_namedusergroup_usergroup_ptr_id_684bf3ca_fk FOREIGN KEY (usergroup_ptr_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: zerver_onboardingstep zerver_onboardingstep_user_id_3ced3a3a_fk_zerver_userprofile_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10306,6 +9710,22 @@ ALTER TABLE ONLY zulip.zerver_onboardingstep ADD CONSTRAINT zerver_onboardingstep_user_id_3ced3a3a_fk_zerver_userprofile_id FOREIGN KEY (user_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: zerver_onboardingusermessage zerver_onboardinguse_message_id_ec6c709e_fk_zerver_me; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_onboardingusermessage + ADD CONSTRAINT zerver_onboardinguse_message_id_ec6c709e_fk_zerver_me FOREIGN KEY (message_id) REFERENCES zulip.zerver_message(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_onboardingusermessage zerver_onboardinguse_realm_id_ef89682e_fk_zerver_re; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_onboardingusermessage + ADD CONSTRAINT zerver_onboardinguse_realm_id_ef89682e_fk_zerver_re FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: zerver_preregistrationrealm zerver_preregistrati_created_realm_id_0c7c7c75_fk_zerver_re; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10331,43 +9751,51 @@ ALTER TABLE ONLY zulip.zerver_preregistrationrealm -- --- Name: zerver_preregistrationuser zerver_preregistrati_multiuse_invite_id_7747603e_fk_zerver_mu; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_preregistrationuser zerver_preregistrati_referred_by_id_51f0a793_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_preregistrationuser - ADD CONSTRAINT zerver_preregistrati_multiuse_invite_id_7747603e_fk_zerver_mu FOREIGN KEY (multiuse_invite_id) REFERENCES zulip.zerver_multiuseinvite(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_preregistrati_referred_by_id_51f0a793_fk_zerver_us FOREIGN KEY (referred_by_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_preregistrationuser_streams zerver_preregistrati_preregistrationuser__332ca855_fk_zerver_pr; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_preregistrationuser_streams zerver_preregistrationuse_preregistrationuser_id_332ca855_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_preregistrationuser_streams - ADD CONSTRAINT zerver_preregistrati_preregistrationuser__332ca855_fk_zerver_pr FOREIGN KEY (preregistrationuser_id) REFERENCES zulip.zerver_preregistrationuser(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_preregistrationuse_preregistrationuser_id_332ca855_fk FOREIGN KEY (preregistrationuser_id) REFERENCES zulip.zerver_preregistrationuser(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_preregistrationuser zerver_preregistrati_referred_by_id_51f0a793_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_preregistrationuser zerver_preregistrationuser_multiuse_invite_id_7747603e_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_preregistrationuser - ADD CONSTRAINT zerver_preregistrati_referred_by_id_51f0a793_fk_zerver_us FOREIGN KEY (referred_by_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_preregistrationuser_multiuse_invite_id_7747603e_fk FOREIGN KEY (multiuse_invite_id) REFERENCES zulip.zerver_multiuseinvite(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_preregistrationuser zerver_preregistrationuser_realm_id_fd5aff83_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_preregistrationuser + ADD CONSTRAINT zerver_preregistrationuser_realm_id_fd5aff83_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_preregistrationuser_streams zerver_preregistrati_stream_id_29da6767_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_preregistrationuser_streams zerver_preregistrationuser_streams_stream_id_29da6767_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_preregistrationuser_streams - ADD CONSTRAINT zerver_preregistrati_stream_id_29da6767_fk_zerver_st FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_preregistrationuser_streams_stream_id_29da6767_fk FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_preregistrationuser zerver_preregistrationuser_realm_id_fd5aff83_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_presencesequence zerver_presencesequence_realm_id_63433ff2_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_preregistrationuser - ADD CONSTRAINT zerver_preregistrationuser_realm_id_fd5aff83_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_presencesequence + ADD CONSTRAINT zerver_presencesequence_realm_id_63433ff2_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10395,35 +9823,75 @@ ALTER TABLE ONLY zulip.zerver_reaction -- --- Name: zerver_realm zerver_realm_can_access_all_users_692c7cc6_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_realm zerver_realm_can_access_all_users_group_id_692c7cc6_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_realm + ADD CONSTRAINT zerver_realm_can_access_all_users_group_id_692c7cc6_fk FOREIGN KEY (can_access_all_users_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_realm zerver_realm_can_create_private_c_ba294d86_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_realm + ADD CONSTRAINT zerver_realm_can_create_private_c_ba294d86_fk_zerver_us FOREIGN KEY (can_create_private_channel_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_realm zerver_realm_can_create_public_ch_6eb35b68_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_realm + ADD CONSTRAINT zerver_realm_can_create_public_ch_6eb35b68_fk_zerver_us FOREIGN KEY (can_create_public_channel_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_realm zerver_realm_create_multiuse_invite_group_id_28a8b9cb_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_realm + ADD CONSTRAINT zerver_realm_create_multiuse_invite_group_id_28a8b9cb_fk FOREIGN KEY (create_multiuse_invite_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_realm zerver_realm_direct_message_initi_e7f0ea74_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_realm - ADD CONSTRAINT zerver_realm_can_access_all_users_692c7cc6_fk_zerver_us FOREIGN KEY (can_access_all_users_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_realm_direct_message_initi_e7f0ea74_fk_zerver_us FOREIGN KEY (direct_message_initiator_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_realm zerver_realm_create_multiuse_invi_28a8b9cb_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_realm zerver_realm_direct_message_permi_df6cc218_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_realm - ADD CONSTRAINT zerver_realm_create_multiuse_invi_28a8b9cb_fk_zerver_us FOREIGN KEY (create_multiuse_invite_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_realm_direct_message_permi_df6cc218_fk_zerver_us FOREIGN KEY (direct_message_permission_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_realm zerver_realm_notifications_stream_f07609e9_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_realm zerver_realm_new_stream_announcements_stream_id_dc0a0303_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_realm - ADD CONSTRAINT zerver_realm_notifications_stream_f07609e9_fk_zerver_st FOREIGN KEY (notifications_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_realm_new_stream_announcements_stream_id_dc0a0303_fk FOREIGN KEY (new_stream_announcements_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_realm zerver_realm_signup_notifications_1e735af4_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_realm zerver_realm_signup_announcements_stream_id_9bdc4b8b_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_realm - ADD CONSTRAINT zerver_realm_signup_notifications_1e735af4_fk_zerver_st FOREIGN KEY (signup_notifications_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_realm_signup_announcements_stream_id_9bdc4b8b_fk FOREIGN KEY (signup_announcements_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_realm zerver_realm_zulip_update_announcements_stream_id_b7809c68_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_realm + ADD CONSTRAINT zerver_realm_zulip_update_announcements_stream_id_b7809c68_fk FOREIGN KEY (zulip_update_announcements_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10443,19 +9911,19 @@ ALTER TABLE ONLY zulip.zerver_realmauditlog -- --- Name: zerver_realmauditlog zerver_realmauditlog_modified_stream_id_4de0252c_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_realmauditlog zerver_realmauditlog_modified_stream_id_4de0252c_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_realmauditlog - ADD CONSTRAINT zerver_realmauditlog_modified_stream_id_4de0252c_fk_zerver_st FOREIGN KEY (modified_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_realmauditlog_modified_stream_id_4de0252c_fk FOREIGN KEY (modified_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_realmauditlog zerver_realmauditlog_modified_user_group__56329312_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_realmauditlog zerver_realmauditlog_modified_user_group_id_56329312_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_realmauditlog - ADD CONSTRAINT zerver_realmauditlog_modified_user_group__56329312_fk_zerver_us FOREIGN KEY (modified_user_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_realmauditlog_modified_user_group_id_56329312_fk FOREIGN KEY (modified_user_group_id) REFERENCES zulip.zerver_namedusergroup(usergroup_ptr_id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10530,14 +9998,6 @@ ALTER TABLE ONLY zulip.zerver_realmuserdefault ADD CONSTRAINT zerver_realmuserdefault_realm_id_0cb9cdb9_fk_zerver_realm_id FOREIGN KEY (realm_id) REFERENCES zulip.zerver_realm(id) DEFERRABLE INITIALLY DEFERRED; --- --- Name: zerver_scheduledemail_users zerver_scheduledemai_scheduledemail_id_792d525e_fk_zerver_sc; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_scheduledemail_users - ADD CONSTRAINT zerver_scheduledemai_scheduledemail_id_792d525e_fk_zerver_sc FOREIGN KEY (scheduledemail_id) REFERENCES zulip.zerver_scheduledemail(id) DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: zerver_scheduledemail_users zerver_scheduledemai_userprofile_id_7e3109ee_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10555,19 +10015,19 @@ ALTER TABLE ONLY zulip.zerver_scheduledemail -- --- Name: zerver_scheduledmessage zerver_scheduledmess_delivered_message_id_e971c426_fk_zerver_me; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_scheduledemail_users zerver_scheduledemail_users_scheduledemail_id_792d525e_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_scheduledmessage - ADD CONSTRAINT zerver_scheduledmess_delivered_message_id_e971c426_fk_zerver_me FOREIGN KEY (delivered_message_id) REFERENCES zulip.zerver_message(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_scheduledemail_users + ADD CONSTRAINT zerver_scheduledemail_users_scheduledemail_id_792d525e_fk FOREIGN KEY (scheduledemail_id) REFERENCES zulip.zerver_scheduledemail(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_scheduledmessagenotificationemail zerver_scheduledmess_mentioned_user_group_6c2b438d_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_scheduledmessage zerver_scheduledmess_delivered_message_id_e971c426_fk_zerver_me; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- -ALTER TABLE ONLY zulip.zerver_scheduledmessagenotificationemail - ADD CONSTRAINT zerver_scheduledmess_mentioned_user_group_6c2b438d_fk_zerver_us FOREIGN KEY (mentioned_user_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY zulip.zerver_scheduledmessage + ADD CONSTRAINT zerver_scheduledmess_delivered_message_id_e971c426_fk_zerver_me FOREIGN KEY (delivered_message_id) REFERENCES zulip.zerver_message(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10619,11 +10079,19 @@ ALTER TABLE ONLY zulip.zerver_scheduledmessage -- --- Name: zerver_scheduledmessage zerver_scheduledmessage_stream_id_45dc289f_fk_zerver_stream_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_scheduledmessage zerver_scheduledmessage_stream_id_45dc289f_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_scheduledmessage - ADD CONSTRAINT zerver_scheduledmessage_stream_id_45dc289f_fk_zerver_stream_id FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_scheduledmessage_stream_id_45dc289f_fk FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_scheduledmessagenotificationemail zerver_scheduledmessageno_mentioned_user_group_id_6c2b438d_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_scheduledmessagenotificationemail + ADD CONSTRAINT zerver_scheduledmessageno_mentioned_user_group_id_6c2b438d_fk FOREIGN KEY (mentioned_user_group_id) REFERENCES zulip.zerver_namedusergroup(usergroup_ptr_id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10635,11 +10103,19 @@ ALTER TABLE ONLY zulip.zerver_service -- --- Name: zerver_stream zerver_stream_can_remove_subscribe_ce4fe4b7_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_stream zerver_stream_can_remove_subscribers_group_id_ce4fe4b7_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_stream + ADD CONSTRAINT zerver_stream_can_remove_subscribers_group_id_ce4fe4b7_fk FOREIGN KEY (can_remove_subscribers_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: zerver_stream zerver_stream_creator_id_65aeba7e_fk_zerver_userprofile_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_stream - ADD CONSTRAINT zerver_stream_can_remove_subscribe_ce4fe4b7_fk_zerver_us FOREIGN KEY (can_remove_subscribers_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_stream_creator_id_65aeba7e_fk_zerver_userprofile_id FOREIGN KEY (creator_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10714,14 +10190,6 @@ ALTER TABLE ONLY zulip.zerver_useractivityinterval ADD CONSTRAINT zerver_useractivityi_user_profile_id_634623af_fk_zerver_us FOREIGN KEY (user_profile_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; --- --- Name: zerver_usergroup zerver_usergroup_can_mention_group_id_3f5cd6cd_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip --- - -ALTER TABLE ONLY zulip.zerver_usergroup - ADD CONSTRAINT zerver_usergroup_can_mention_group_id_3f5cd6cd_fk_zerver_us FOREIGN KEY (can_mention_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: zerver_usergroup zerver_usergroup_realm_id_8b78d3b3_fk_zerver_realm_id; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- @@ -10731,19 +10199,19 @@ ALTER TABLE ONLY zulip.zerver_usergroup -- --- Name: zerver_usergroupmembership zerver_usergroupmemb_user_group_id_7722d5a1_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_usergroupmembership zerver_usergroupmemb_user_profile_id_6aa688e2_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_usergroupmembership - ADD CONSTRAINT zerver_usergroupmemb_user_group_id_7722d5a1_fk_zerver_us FOREIGN KEY (user_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_usergroupmemb_user_profile_id_6aa688e2_fk_zerver_us FOREIGN KEY (user_profile_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_usergroupmembership zerver_usergroupmemb_user_profile_id_6aa688e2_fk_zerver_us; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_usergroupmembership zerver_usergroupmembership_user_group_id_7722d5a1_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_usergroupmembership - ADD CONSTRAINT zerver_usergroupmemb_user_profile_id_6aa688e2_fk_zerver_us FOREIGN KEY (user_profile_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_usergroupmembership_user_group_id_7722d5a1_fk FOREIGN KEY (user_group_id) REFERENCES zulip.zerver_usergroup(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10787,19 +10255,19 @@ ALTER TABLE ONLY zulip.zerver_userprofile -- --- Name: zerver_userprofile zerver_userprofile_default_events_regis_40e28493_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_userprofile zerver_userprofile_default_events_register_s_40e28493_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_userprofile - ADD CONSTRAINT zerver_userprofile_default_events_regis_40e28493_fk_zerver_st FOREIGN KEY (default_events_register_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_userprofile_default_events_register_s_40e28493_fk FOREIGN KEY (default_events_register_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- --- Name: zerver_userprofile zerver_userprofile_default_sending_stre_3ba7368b_fk_zerver_st; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- Name: zerver_userprofile zerver_userprofile_default_sending_stream_id_3ba7368b_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip -- ALTER TABLE ONLY zulip.zerver_userprofile - ADD CONSTRAINT zerver_userprofile_default_sending_stre_3ba7368b_fk_zerver_st FOREIGN KEY (default_sending_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT zerver_userprofile_default_sending_stream_id_3ba7368b_fk FOREIGN KEY (default_sending_stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; -- @@ -10866,6 +10334,14 @@ ALTER TABLE ONLY zulip.zerver_userstatus ADD CONSTRAINT zerver_userstatus_user_profile_id_bbe3876b_fk_zerver_us FOREIGN KEY (user_profile_id) REFERENCES zulip.zerver_userprofile(id) DEFERRABLE INITIALLY DEFERRED; +-- +-- Name: zerver_usertopic zerver_usertopic_stream_id_0ce5ea26_fk; Type: FK CONSTRAINT; Schema: zulip; Owner: zulip +-- + +ALTER TABLE ONLY zulip.zerver_usertopic + ADD CONSTRAINT zerver_usertopic_stream_id_0ce5ea26_fk FOREIGN KEY (stream_id) REFERENCES zulip.zerver_stream(id) DEFERRABLE INITIALLY DEFERRED; + + -- -- PostgreSQL database dump complete --