Database Console result changes to read only after changing schemas

So i have a problem on PHPStorm, i have 3 schemas under the same database connection.  Lets call them S1, S2 and S3.

If i switch to S1, PHPStorm executes "use S1" in the background, and if i run a select query S1 data returns and i can edit it fine.  All good there.

If i switch to S2, or S3 howerver, PHPStorm executes the "use" command fine, and it selects fine - yet, the data returned is 'Read-Only' and i cannot edit it.

However, if i specify the schema in the select query ("select * from s2.table;") - i can edit the data fine. 

Anyone know if this is a bug, or perhaps a setting i need to change?

As i'm building queries based on a backup/snapshot schema i don't want to be specifying the schema within queries to place into my PHP code for live deployment, so this is a bit of a problem.

Many thanks!

5 comments
Comment actions Permalink

Does the result also have this 'Unresolved table reference' popup as on the screenshot here?
https://youtrack.jetbrains.com/issue/DBE-8331

0
Comment actions Permalink

Hi Eugene, thanks for the response.

And yes it does have that pop-up also, but table appears in the tree view fine - any suggestions?

0
Comment actions Permalink

Try adding those schemas at File | Settings | Languages & Frameworks | SQL Resolution Scopes

0
Comment actions Permalink

Thanks again, i did add them via the control at the top of that dialog - but it made no difference.  The plus button on that screen just opened a file browser.

I've also noticed that if i copy a line from the returned results using 'SQL Inserts' mode, it doesn't provide the table name when pasted into the editor - instead it uses a placeholder 'MY_TABLE', i.e.:-

INSERT INTO MY_TABLE(col1, col2...) VALUES (data1, data2....);

Works fine on the first schema, but with any of the others selected it gives me the 'MY_TABLE' identifier.

0
Comment actions Permalink

Trying to reproduce the issue locally, no luck: https://recordit.co/bAJIkGhwY0
Please record a similar screencast, maybe I'll be able to spot what's wrong.

0

Please sign in to leave a comment.