Skip to content

Commit

Permalink
tmp: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal-Leszczynski committed Aug 21, 2024
1 parent 1a8dc1d commit 3193a54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
5 changes: 1 addition & 4 deletions pkg/schema/table/table.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions pkg/service/restore/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ type Run struct {
// Cache that's initialized once for entire task
Units []Unit
Views []View

// Remove those fields to schema.
Location string
ManifestPath string
Keyspace string `db:"keyspace_name"`
Table string `db:"table_name"`
}

// Unit represents restored keyspace and its tables with their size.
Expand Down Expand Up @@ -166,7 +160,7 @@ type RunProgress struct {
TaskID uuid.UUID
RunID uuid.UUID

RemoteSSTableDir string // Add this field to schema.
RemoteSSTableDir string `db:"remote_sstable_dir"`
Keyspace string `db:"keyspace_name"`
Table string `db:"table_name"`
SSTableID []string `db:"sstable_id"`
Expand All @@ -185,7 +179,7 @@ type RunProgress struct {
Failed int64
VersionedProgress int64

// Remove this field from schema.
// Not used, but can't be removed because it is clustering key.
ManifestPath string
}

Expand Down
6 changes: 6 additions & 0 deletions schema/v3.4.0.cql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE restore_run DROP location;
ALTER TABLE restore_run DROP manifest_path;
ALTER TABLE restore_run DROP keyspace_name;
ALTER TABLE restore_run DROP table_name;

ALTER TABLE restore_run_progress ADD remote_sstable_dir text;

0 comments on commit 3193a54

Please sign in to comment.