mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 00:51:12 +00:00
Part of the Go project layout migration, item 27. Pure move plus import-path rewrite across 502 files. No API or behaviour change. `internal/` keeps the messaging application logic unimportable from outside the module, which is what the issue asks for -- status-go is consumed through the C-bindings in mobile/, not as a Go library. Things that had to follow the move, beyond the Go imports: - tools/generate-handlers/template.txt. messenger_handlers.go is generated, and the template hard-codes the imports it emits, so the generated file kept importing protocol/common and failed typecheck. - .gitignore. The ignore rule for that generated file was pinned to the old path; without moving it, a 1486-line generated file starts being tracked. - Makefile: the logosstorage and torrent test targets (both the archive packages and ./protocol itself), the archive README, migration-protocol. - scripts/run_unit_tests.sh, which names the protocol package explicitly to shard its tests. - scripts/cleanup_generated_files.sh and .golangci.yml. scripts/migration_check.sh also needed a fix that is not specific to this move: it validated every file the branch touched under a migration dir against the timestamp naming rule, and a directory rename makes every migration in it look newly added. It now excludes renames, so moving a migration is not mistaken for adding one. refs #7067
55 lines
1.7 KiB
SQL
55 lines
1.7 KiB
SQL
CREATE TABLE IF NOT EXISTS push_notification_client_servers (
|
|
public_key BLOB NOT NULL,
|
|
registered BOOLEAN DEFAULT FALSE,
|
|
registered_at INT NOT NULL DEFAULT 0,
|
|
last_retried_at INT NOT NULL DEFAULT 0,
|
|
retry_count INT NOT NULL DEFAULT 0,
|
|
access_token TEXT,
|
|
UNIQUE(public_key) ON CONFLICT REPLACE
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS push_notification_client_queries (
|
|
public_key BLOB NOT NULL,
|
|
queried_at INT NOT NULL,
|
|
query_id BLOB NOT NULL,
|
|
UNIQUE(public_key,query_id) ON CONFLICT REPLACE
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS push_notification_client_info (
|
|
public_key BLOB NOT NULL,
|
|
server_public_key BLOB NOT NULL,
|
|
installation_id TEXT NOT NULL,
|
|
access_token TEXT NOT NULL,
|
|
retrieved_at INT NOT NULL,
|
|
version INT NOT NULL,
|
|
UNIQUE(public_key, installation_id, server_public_key) ON CONFLICT REPLACE
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS push_notification_client_tracked_messages (
|
|
message_id BLOB NOT NULL,
|
|
chat_id TEXT NOT NULL,
|
|
tracked_at INT NOT NULL,
|
|
UNIQUE(message_id) ON CONFLICT IGNORE
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS push_notification_client_sent_notifications (
|
|
message_id BLOB NOT NULL,
|
|
public_key BLOB NOT NULL,
|
|
hashed_public_key BLOB NOT NULL,
|
|
installation_id TEXT NOT NULL,
|
|
last_tried_at INT NOT NULL,
|
|
retry_count INT NOT NULL DEFAULT 0,
|
|
success BOOLEAN NOT NULL DEFAULT FALSE,
|
|
error INT NOT NULL DEFAULT 0,
|
|
UNIQUE(message_id, public_key, installation_id) ON CONFLICT REPLACE
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS push_notification_client_registrations (
|
|
registration BLOB NOT NULL,
|
|
contact_ids BLOB,
|
|
synthetic_id INT NOT NULL DEFAULT 0,
|
|
UNIQUE(synthetic_id) ON CONFLICT REPLACE
|
|
);
|
|
|
|
CREATE INDEX idx_push_notification_client_info_public_key ON push_notification_client_info(public_key, installation_id);
|