Skip to content

Commit 6838f60

Browse files
authored
feat(serverless_sqldb): swap values of OrderBy of list database (#3771)
1 parent bd18640 commit 6838f60

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cmd/scw/testdata/test-all-usage-sdb-sql-backup-list-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
3+
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in descending order, though this can be modified via the order_by field.
44

55
USAGE:
66
scw sdb-sql backup list [arg=value ...]
77

88
ARGS:
99
[project-id] Filter by the UUID of the Scaleway project.
1010
database-id Filter by the UUID of the Serverless SQL Database.
11-
[order-by] Sorting criteria. One of `created_at_asc`, `created_at_desc`. (created_at_asc | created_at_desc)
11+
[order-by] Sorting criteria. One of `created_at_asc`, `created_at_desc`. (created_at_desc | created_at_asc)
1212
[organization-id] Filter by the UUID of the Scaleway organization.
1313
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | all)
1414

docs/commands/sdb-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ scw sdb-sql backup get <backup-id ...> [arg=value ...]
6262

6363
### List your Serverless SQL Database backups
6464

65-
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
65+
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in descending order, though this can be modified via the order_by field.
6666

6767
**Usage:**
6868

@@ -77,7 +77,7 @@ scw sdb-sql backup list [arg=value ...]
7777
|------|---|-------------|
7878
| project-id | | Filter by the UUID of the Scaleway project. |
7979
| database-id | Required | Filter by the UUID of the Serverless SQL Database. |
80-
| order-by | One of: `created_at_asc`, `created_at_desc` | Sorting criteria. One of `created_at_asc`, `created_at_desc`. |
80+
| order-by | One of: `created_at_desc`, `created_at_asc` | Sorting criteria. One of `created_at_asc`, `created_at_desc`. |
8181
| organization-id | | Filter by the UUID of the Scaleway organization. |
8282
| region | Default: `fr-par`<br />One of: `fr-par`, `all` | Region to target. If none is passed will use default region from the config |
8383

internal/namespaces/serverless_sqldb/v1alpha1/serverless_sqldb_cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ func sdbSQLBackupGet() *core.Command {
340340
func sdbSQLBackupList() *core.Command {
341341
return &core.Command{
342342
Short: `List your Serverless SQL Database backups`,
343-
Long: `List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.`,
343+
Long: `List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in descending order, though this can be modified via the order_by field.`,
344344
Namespace: "sdb-sql",
345345
Resource: "backup",
346346
Verb: "list",
@@ -367,7 +367,7 @@ func sdbSQLBackupList() *core.Command {
367367
Required: false,
368368
Deprecated: false,
369369
Positional: false,
370-
EnumValues: []string{"created_at_asc", "created_at_desc"},
370+
EnumValues: []string{"created_at_desc", "created_at_asc"},
371371
},
372372
{
373373
Name: "organization-id",

0 commit comments

Comments
 (0)