Closes: https://github.com/hasura/graphql-engine/issues/6969
Description:
To reproduce the issue please visit the issue link.
This is happening because the request payload is using the current table name while cloning permission. This PR change makes the payload use the correct table name.
- [ ] `CHANGELOG.md` is updated with user-facing content relevant to this PR. If no changelog is required, then add the `no-changelog-required` label.
### Affected components
- [x] Console
- [x] CLI
https://github.com/hasura/graphql-engine-mono/pull/1505
GitOrigin-RevId: bfd8a67ccb55261a1bf47a9ede18e3e1cf3bff2c
>
### Description
We want to hide postgres system schemas like `pg_toast` and `pg_temp` and their variations (ex. `pg_toast_temp_35`) from showing up in console.
>
### 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.
### Affected components
- [x] Console
### Related Issues
->
https://github.com/hasura/graphql-engine/issues/6954
### Solution and Design
>
We can achieve this by updating the `schemaListSql` query for postgres datasources to filter out postgres system schemas.
### Steps to test and verify
>
1. Add a postgres datasource containing some system schemas
2. The system schemas should not show up in console
https://github.com/hasura/graphql-engine-mono/pull/1499
Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: 6a179b9d5cd4d061ae9fda17bf3824321cf7e96e
>
Adding a table with a capital letter and a comment was causing SQL error, this PR fixes that issue. (in postgres and citus dbs)
### Description
>
### 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.
### Affected components
- [x] Console
https://github.com/hasura/graphql-engine-mono/pull/1617
GitOrigin-RevId: b8e911206af7ce950b5432dab98723e52992b905
Modify page for mssql.
Column edit, add and delete
Pk add and delete
unique key add and delete
> Known Issues
> It is not because of this PR, but evident after implementing this changes.
> Table comments section is not only showing table comments but also anything that has `SYS.EXTENDED_PROPERTIES` with the table id, we may need to fix this by adding more conditions while fetching the table comments
> issue: https://github.com/hasura/graphql-engine-mono/issues/1486
Update
> Found a common issue while testing this PR, and it happens for PG tables too, so keeping it as a different issue
https://github.com/hasura/graphql-engine/issues/7018
GitOrigin-RevId: f7883a797ce8d25034824ae35668b1f830e59c70
Closes: https://github.com/hasura/graphql-engine/issues/6858
Description:
Following two things are done:
1. Show compatible functions in the Untracked custom functions list (i.e. even those with ROWTYPE arg)
![Screenshot from 2021-05-11 16-13-21](https://user-images.githubusercontent.com/68095256/117803100-dd606f80-b273-11eb-8d02-1ea55b31863d.png)
2. When a function with ROWTYPE argument is tracked, a confirmatory dialogue box is shown. The text reads `This function can be added as a root field or a computed field inside a table` and the buttons reflect the options: `Add as root field`, `Add as computed field` (this will take the user to the Modify -> Add a computed field section of the first-row type argument)
![Screenshot from 2021-06-03 17-28-28](https://user-images.githubusercontent.com/68095256/120641377-28dff500-c491-11eb-80ea-cc60e6f37f23.png)
Affected Component:
- [x] Console
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
GitOrigin-RevId: 089944aadba73f7a77e220a49489846ff1cb9540
### Description
The `statementTimeout` on RawSQL is not reset after changing a datasource. This causes an error when running SQL and parsing the results for DBs that don't support statement timeout property on the console.
![timeout](https://user-images.githubusercontent.com/11921040/120473505-b6094800-c3c4-11eb-8b00-e43d9ebcb207.gif)
### Affected components
- [x] Console
### Steps to test and verify
- Open /data/manage
- Click on any SQL Server DB.
- Go to Raw SQL
- Run any query
- Verify correct result
GitOrigin-RevId: 8a0adaf308d14db17126953286173da7ef1afc1c
adds foreign key functionality to mssql tables under Modify Tab.
Steps to test:
1. Connect an MSSQL data source.
2. Create a table
3. go to modify page
4. make sure the `Add foreign key `button is visible
5. click on `Add foreign key`, and try to add FK
6. after adding the FK, we will see the `edit` and `remove` button, try to edit and remove the FK
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 63be7c4ef909503ac05096a64c686b72f7c47307
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
### 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
This adds the feature to edit data sources to the console
Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Martin Mark <74692114+martin-hasura@users.noreply.github.com>
GitOrigin-RevId: 40f97a362620e9cebe97a2267cb9fb143c32af5d
The changes turned out to be flaky — tests were failing from time to time, and blocking other PRs from being merged.
Reverts hasura/graphql-engine-mono#1037
GitOrigin-RevId: 97d95156e8d348f2e89ec33e06ffaac9bf75a2f9
This is the first step in making our cypress test faster.
Will clean the comments up in the coming days
Running time imporves from ~7mins to ~83secs
GitOrigin-RevId: d8d2b23c5a46789a3828dac1c6652034bd0bfc1c