SIGN IN SIGN UP

feat: Add migrate command and --no-migrate option to sync (#3169)

## Description

This change adds a couple of new features:
 - a `--no-migrate` flag to the `sync` command, to skip migrations when running a sync
 - a new `migrate` command, taking the same arguments as `sync`, to run migrations and nothing else
 - print lines to note when migrations start and end
 - log lines when the CLI exits with an error

## Example interactions

Migration command:

```
cloudquery migrate cloudquery.yml
Loading spec(s) from cloudquery.yml
Starting migration for: aws -> [postgresql]
Migration completed successfully.
Starting migration for: gcp -> [postgresql]
Migration completed successfully.
```

Migration before sync (default behavior):

```
cloudquery sync cloudquery.yml
Loading spec(s) from cloudquery.yml
Starting migration for: aws -> [postgresql]
Migration completed successfully.
Starting sync for: aws -> [postgresql]
Sync completed successfully.
Summary: resources: 7, errors: 0, panic: 0, failed_writes: 0, time: 6s
Starting migration for: gcp -> [postgresql]
Migration completed successfully.
Starting sync for: gcp -> [postgresql]
Sync completed successfully.
Summary: resources: 10, errors: 0, panic: 0, failed_writes: 0, time: 6s
```

Sync without migration using `--no-migrate` flag:

```
cloudquery sync --no-migrate cloudquery.yml
Loading spec(s) from cloudquery.yml
Starting sync for: aws -> [postgresql]
Sync completed successfully.
Summary: resources: 7, errors: 0, panic: 0, failed_writes: 0, time: 6s
Starting sync for: gcp -> [postgresql]
Sync completed successfully.
Summary: resources: 10, errors: 0, panic: 0, failed_writes: 0, time: 6s
```

## Related Issues

Closes https://github.com/cloudquery/cloudquery/issues/3077
Closes https://github.com/cloudquery/cloudquery/issues/2922
Closes https://github.com/cloudquery/cloudquery/issues/3168
H
Herman Schaaf committed
b56be8bb6f526cb767ef5648a262ddae1eebfb36
Parent: b01cd0b
Committed by GitHub <noreply@github.com> on 10/30/2022, 1:09:41 PM