Before: on edit source page, changing data source name was not allowed and the input disabled.
Now: data source name can be changed on edit source page.
Note:
- ~When only the data source name is changed, a request is sent for renaming and another for updating data source even when other values of the data source configuration weren't changed.~
- This has been fixed and should be tested thus:
- run `npm run jest`
- on edit source UI, change only data source name and confirm that only `rename_source` request is being sent through network tab in dev tools
- change any other fields but the source name, and confirm that only `add_source` with `replace_configuration: true` is sent.
- change both source name and any other field in the form and confirm that both request are sent (in this order: rename request before add request) and export_metadata request only sent once after that.
- Try with bigquery, mssql and postgres
Possible Refactor:
- consider if `renameDataSource` and `addDataSource`, can be refactored or left as is
Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: cbb041ac8362fd94de5aa19bfa61c0cde8703459
### Description
This PR adds `Create Table` view for MSSQL server schemas.
### Changelist
* [x] Add basic `create table` form view on navigating from Schema's create table action.
* [x] Hide frequently selected columns button.
* [x] Allow the user to manually add column types for now: convert `select` for columns to a `text` input .
* [x] Remove `Restrict` radio selection for foreign key constraints.
* [x] Add SQL query for Create table in MSSQL.
### Screenshot
![Screenshot 2021-03-09 at 5 22 03 PM](https://user-images.githubusercontent.com/11921040/110467030-82d45700-80fc-11eb-84af-dd228d84b135.png)
### Changelog
- [x] CHANGELOG.md is updated with user-facing content relevant to this PR. If no changelog is required, then add the no-changelog-required label.
### Modified components
- Console
Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: a783b5940198ecf582d1cd6ad4d4224efabf59fc
Adding regex expression to test `view`, `table` and `function` routes.
Fixes no highlight issue when clicking on functions in the data tab navigation tree.
GitOrigin-RevId: f278998ec1c98c98e0bfc9cd72d63d673cd74012
Fixes [issue](https://github.com/hasura/graphql-engine/issues/6937)
### Description
The problem lies with the `schemaListSql` for Big Query. Without a region qualifier prefixed, the SQL result contains datasets only US regions, as described in the [docs](https://cloud.google.com/bigquery/docs/information-schema-datasets).
```
If you do not specify a regional qualifier, metadata is retrieved from the us multi-region.
```
The alternative way is to get a list of all available publicly available regions (which is `us` and `europe` atm), for example for europe -
```
SELECT * FROM region-europe.INFORMATION_SCHEMA.SCHEMATA;
```
and then perform `UNION ALL` of the results. This is approached is ditched in favour of the reason that Big Query is read-only on Hasura and new datasets cannot be added from the console (other than by modifying the metadata), we can return the datasets available in the Big Query source's metadata as the possible values of datasets needed by the console to render the data nav tree, thereby avoiding an extra API call in the process.
GitOrigin-RevId: 8117d5698dcc4e7d932362b7cf2e7c8ef34d106a
event catalog:
- `hdb_catalog` is no longer automatically created
- catalog is initialised when the first event trigger is created
- catalog initialisation is done during the schema cache build, using `ArrowCache` so it is only run in response to a change to the set of event triggers
event queue:
- `processEventQueue` thread is prevented from starting when `HASURA_GRAPHQL_EVENTS_FETCH_INTERVAL=0`
- `processEventQueue` thread only processes sources for which at least one event trigger exists in some table in the source
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: 73f256465d62490cd2b59dcd074718679993d4fe
### Description
- Fixes https://github.com/hasura/graphql-engine/issues/6926
- This is to resolve the issue where inherited tables get listed into the array that's used to filter off partitions.
- In the check, we compare if the partition's parent is a "partitioned table" or not before adding to the filter array.
### Steps to verify
- Create the following tables on a postgres db
```SQL
CREATE TABLE cities (
id SERIAL PRIMARY KEY,
name text,
population real,
elevation int -- (in ft)
);
CREATE TABLE capitals (
state char(2) UNIQUE NOT NULL
) INHERITS (cities);
```
- Navigate to the data tab, and click on the datasource > schema, and verify that both `cities` and `capitals` are present.
- Click on `capitals` and see if it loads properly.
- Create the following table and its partitions
```sql
CREATE TABLE measurement (
city_id int not null,
logdate date not null,
peaktemp int,
unitsales int
) PARTITION BY RANGE (logdate);
CREATE TABLE measurement_y2006m02 PARTITION OF measurement
FOR VALUES FROM ('2006-02-01') TO ('2006-03-01');
CREATE TABLE measurement_y2006m03 PARTITION OF measurement
FOR VALUES FROM ('2006-03-01') TO ('2006-04-01');
```
- Verify that the data tab nav does not show `measurement_y2006m02` and `measurement_y2006m03`
GitOrigin-RevId: 1cc988fff03f289e6ea36d0b1e9f8e54b8741be9
This fixes `column "column_name" named in key does not exist"`,
when changing editing a column to be unique in column editor. resolves [6734](https://github.com/hasura/graphql-engine/issues/6734)
GitOrigin-RevId: 5c8f9523d6c022245cd4c1bb5d0d4a3340c455cf
It contains 2 flags
all - To delete all migrations locally and on database
version - To delete a single migration locally and on database
Usage :
`hasura migrate delete --all`
`hasura migrate delete --version <version_number>`
Additional fix :
The `migrate squash` will deletes the migration history on server after squashing if user opts to delete the migrations.
closes https://github.com/hasura/graphql-engine-mono/issues/292
closes https://github.com/hasura/graphql-engine/issues/5373
closes https://github.com/hasura/graphql-engine/issues/6434
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: fa7ceae7a1970d6724fb601a147900e880ad2e6f