mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-12 21:02:14 +00:00
update analytics queries
This commit is contained in:
1 parent
98f1e20bdd
commit
11e2921b63
2 files changed
+15
No files matched your search
File renamed without changes.
@@ -0,0 +1,15 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
-- Find users with studio flags.
|
||||
select username from users where maybe_feature_flags like '%studio%';
|
||||
|
||||
-- Sync the top-level boolean with the authoritative feature flags field.
|
||||
-- Performs a full table scan and string search, but is relatively quick.
|
||||
-- NB: Can't use users in the subquery:
|
||||
-- ERROR 1093 (HY000): You can't specify target table 'users' for update in FROM clause
|
||||
UPDATE users u INNER JOIN users uf
|
||||
ON u.token = uf.token
|
||||
SET u.can_access_studio = true
|
||||
WHERE uf.maybe_feature_flags like '%studio%';
|
||||
Reference in new issue
Block a user