| 17:35:56.682 | 6.3 ms | SELECT | SELECT * FROM "global"."vw_user_login" WHERE "id"=1001 |
| 17:35:56.703 | 7.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:35:56.726 | 7.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"='4174' |
| 17:35:56.757 | 5.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomy_relationships" WHERE "object_id"=4174 |
| 17:35:56.765 | 5.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomies" WHERE ("term_id"=13) AND ("id" IN (5, 226, 128, 181, 184, 189, 349)) ORDER BY "sort" |
| 17:35:56.777 | 11.2 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_term_taxonomies'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:35:56.790 | 34.0 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_term_taxonomies'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:35:56.833 | 5.7 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_projects" WHERE ("client_id"='3462') AND ("project_title"='销售线索生成20260602001') AND ("id" != 4174)) |
| 17:35:56.840 | 3.8 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_contract_types" WHERE "id"='1') |
| 17:35:56.848 | 5.5 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='3462') |
| 17:35:56.856 | 6.0 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_project_progresses" WHERE "id"='5') |
| 17:35:56.867 | 8.0 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_project_statuses" WHERE "id"='3') |
| 17:35:56.878 | 125.6 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001) |
| 17:35:57.004 | 6.5 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001) |
| 17:35:57.012 | 7.9 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_contacts" WHERE "id"='3649') |
| 17:35:57.034 | 2.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:35:57.037 | 0.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_product_types" WHERE "project_id"=4174 |
| 17:35:57.038 | 3.6 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_project_product_types'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:35:57.042 | 22.7 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_project_product_types'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:35:57.065 | 0.6 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_project_product_types" WHERE "project_id"=4174 |
| 17:35:57.066 | 3.6 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_product_types'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:35:57.070 | 18.5 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_product_types'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:35:57.089 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_product_types" WHERE "id"=2 |
| 17:35:57.089 | 305.8 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_project_product_types" ("project_id", "product_type_id", "name", "budget", "pct", "profit") VALUES (4174, 2, '服务器', '0', 0, '0') |
| 17:35:57.395 | 1.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id"=4174 ORDER BY "id" |
| 17:35:57.397 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:35:57.397 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id"=4174 ORDER BY "id" |
| 17:35:57.826 | 198.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_change_logs" WHERE ("project_id"=4174) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:35:58.095 | 838.5 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Projects', 4174, 'a:1:{s:6:"end_at";s:19:"2026-06-02 16:53:15";}', '', 1001, '221.216.117.119') |
| 17:35:58.934 | 0.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:35:58.936 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:35:58.936 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id"=4174 ORDER BY "id" |
| 17:35:58.945 | 113.8 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_order_items" WHERE ("project_id"=4174) AND (erp_sales_outbound_id is not null) |
| 17:35:59.060 | 4.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_change_logs" WHERE ("project_id"=4174) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:35:59.064 | 3.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Projects', 4174, 'a:1:{s:6:"end_at";s:19:"2026-06-02 16:53:15";}', '', 1001, '221.216.117.119') |
| 17:35:59.067 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:35:59.068 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:35:59.069 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_contact_points" WHERE "project_id"=4174 |
| 17:35:59.069 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_contact_point_rels" WHERE "project_id"=4174 |
| 17:35:59.070 | 64.8 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_contacts" WHERE "id"='3649' |
| 17:35:59.202 | 322.5 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_object_change_logs" ("act", "attribute", "object_id", "object_type", "created_by", "created_at", "new_value", "old_value", "description") VALUES (2, 'from_contact', 4174, 1, 1001, 'now()', '["\u59da\u96ea\u7eaf"]', '[null]', '{"d1":"\u5218\u4eba\u8bda","d2":"\u66f4\u65b0\u4e86","d3":"\u5546\u673a\u6765\u6e90","d4":["(\u672a\u8bbe\u7f6e) <b>\u53d8\u4e3a<\/b> \u59da\u96ea\u7eaf"]}') |
| 17:35:59.530 | 5.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_contacts" WHERE "id"='3649' |
| 17:35:59.538 | 6.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='3462' |
| 17:35:59.554 | 209.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_user_action_logs" ("act", "attribute", "object_id", "object_type", "created_by", "created_at", "new_value", "old_value", "users", "description") VALUES (2, 'from_contact', 4174, 1, 1001, 'now()', '["\u59da\u96ea\u7eaf"]', '[null]', array[1001], '{"d1":"\u5218\u4eba\u8bda","d2":"\u66f4\u65b0\u4e86","d3":"\u5546\u673a\u6765\u6e90","d4":["(\u672a\u8bbe\u7f6e) <b>\u53d8\u4e3a<\/b> \u59da\u96ea\u7eaf"]}') |
| 17:35:59.765 | 170.2 ms | UPDATE | UPDATE "a57be577deb434"."tbl_projects" SET "client_id"=3462, "project_status"=3, "project_progress"=5, "budget"='0', "profit_pct"='0', "updated_at"='now()', "contract_type"=1, "end_at"='now()', "from_contact"=3649 WHERE "id"=4174 |
| 17:35:59.938 | 11.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_change_logs" WHERE ("project_id"=4174) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:35:59.953 | 7.0 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Projects', 4174, 'a:2:{s:6:"end_at";s:19:"1970-01-01 08:00:00";s:12:"from_contact";s:4:"3649";}', '', 1001, '221.216.117.119') |
| 17:35:59.963 | 7.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='3462' |
| 17:35:59.973 | 7.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:35:59.985 | 4.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_architects" WHERE "project_id"=4174 |
| 17:35:59.993 | 7.7 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomy_relationships" WHERE "object_id"=4174 |
| 17:36:00.003 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomies" WHERE ("term_id"=9) AND ("id" IN (5, 226, 128, 181, 184, 189, 349)) ORDER BY "sort" |
| 17:36:00.004 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomies" WHERE "id"=128 |
| 17:36:00.004 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomies" WHERE "id"='128' |
| 17:36:00.005 | 0.3 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_term_taxonomy_relationships" WHERE ("object_id"=4174) AND ("term_id"=9) |
| 17:36:00.005 | 3.5 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_term_taxonomy_relationships'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:00.009 | 28.7 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_term_taxonomy_relationships'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:00.039 | 155.4 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_term_taxonomy_relationships" ("term_id", "taxonomy_id", "object_id") VALUES (9, 128, 4174) |
| 17:36:00.198 | 7.7 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomies" WHERE "id"=181 |
| 17:36:00.209 | 15.1 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_term_taxonomies" WHERE "id"='181' |
| 17:36:00.228 | 7.0 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_term_taxonomy_relationships" WHERE ("object_id"=4174) AND ("term_id"=13) |
| 17:36:00.239 | 9.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_term_taxonomy_relationships" ("term_id", "taxonomy_id", "object_id") VALUES (13, 181, 4174) |
| 17:36:00.251 | 7.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_remind_receivers" WHERE "project_id"=4174 |
| 17:36:00.259 | 275.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contracts" WHERE "from_project"=4174 |
| 17:36:00.535 | 6.3 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_sales_contracts'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:00.542 | 26.4 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_sales_contracts'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:00.609 | 0.6 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_project_product_rels" WHERE "project_id"=4174 ORDER BY "id") |
| 17:36:00.610 | 0.6 ms | UPDATE | UPDATE "a57be577deb434"."tbl_sales_contracts" SET "amount"='0', "contract_type"=1, "save_collection_at"='now()' WHERE "id"=4486 |
| 17:36:00.611 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\SalesContracts', 4486, 'a:1:{s:18:"save_collection_at";s:5:"now()";}', '', 1001, '221.216.117.119') |
| 17:36:00.612 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:36:00.612 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:36:00.613 | 0.4 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_contract_default_remind_users" WHERE ("user_id"=1001) AND ("type"=1) |
| 17:36:00.614 | 3.4 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_contract_default_remind_users'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:00.617 | 21.5 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_contract_default_remind_users'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:00.639 | 45.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_contract_default_remind_users" ("user_id", "remind_user", "type") VALUES (1001, 1001, 1) |
| 17:36:00.685 | 0.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_receivers" WHERE "contract_id"=4486 |
| 17:36:00.686 | 3.3 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_sales_contract_payment_collection_remind_receivers'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:00.689 | 22.1 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_sales_contract_payment_collection_remind_receivers'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:00.712 | 0.3 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_receivers" WHERE "contract_id"=4486 |
| 17:36:00.713 | 82.0 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_sales_contract_payment_collection_remind_receivers" ("contract_id", "user_id") VALUES (4486, 1001) RETURNING "id" |
| 17:36:00.795 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\SalesContractPaymentCollectionRemindReceivers', 10171, 'a:3:{s:2:"id";i:10171;s:11:"contract_id";i:4486;s:7:"user_id";s:4:"1001";}', '', 1001, '221.216.117.119') |
| 17:36:00.795 | 0.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE "contract_id"=4486 |
| 17:36:00.796 | 0.3 ms | DELETE | DELETE FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE "contract_id"=4486 |
| 17:36:00.797 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contracts" WHERE "id"=4486 |
| 17:36:00.798 | 3.6 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_sales_contract_payment_collection_remind_dates'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:00.801 | 22.5 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_sales_contract_payment_collection_remind_dates'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:00.824 | 0.3 ms | UPDATE | UPDATE "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" SET "paid_amount"='0', "status"=0, "overdue_days"=NULL WHERE "contract_id"=4486 |
| 17:36:00.825 | 0.8 ms | SELECT | SELECT r.amount, t.created_at FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (2, 5, 1)) |
| 17:36:00.826 | 1.0 ms | SELECT | SELECT r.amount, t.wrote_date as created_at FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (2, 5, 1)) |
| 17:36:00.827 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:36:00.828 | 0.4 ms | SELECT | SELECT SUM(amount) FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE "contract_id"=4486 |
| 17:36:00.829 | 8.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_change_logs" WHERE ("project_id"=4174) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:36:00.838 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Projects', 4174, 'a:1:{s:6:"end_at";s:19:"2026-06-05 17:35:57";}', '', 1001, '221.216.117.119') |
| 17:36:00.838 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:36:00.839 | 0.7 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE ("contract_id"=4486) AND (amount > paid_amount) ORDER BY "remind_date" |
| 17:36:00.840 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contracts" WHERE "id"=4486 |
| 17:36:00.840 | 0.4 ms | SELECT | SELECT SUM(r.amount) FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (2, 5)) |
| 17:36:00.841 | 0.6 ms | SELECT | SELECT SUM(r.amount) FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (2, 5)) |
| 17:36:00.842 | 1.0 ms | SELECT | SELECT SUM(r.amount) FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_tickets" "t" ON r.erp_payment_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (2, 5)) AND ("t"."is_payment_settle"=TRUE) |
| 17:36:00.843 | 0.4 ms | SELECT | SELECT EXISTS(SELECT "r".* FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status"=1)) |
| 17:36:00.844 | 0.6 ms | SELECT | SELECT EXISTS(SELECT "r".* FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status"=1)) |
| 17:36:00.845 | 0.6 ms | SELECT | SELECT EXISTS(SELECT "r".* FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_tickets" "t" ON r.erp_payment_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status"=1)) |
| 17:36:00.845 | 0.4 ms | SELECT | SELECT SUM(r.amount) FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."is_payment_settle"=TRUE) AND ("t"."status" IN (1, 2, 5)) |
| 17:36:00.846 | 0.7 ms | SELECT | SELECT SUM(r.amount) FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (1, 2, 5)) |
| 17:36:00.847 | 0.7 ms | SELECT | SELECT SUM(r.amount) FROM "a57be577deb434"."tbl_erp_payment_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_payment_tickets" "t" ON r.erp_payment_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (1, 2, 5)) |
| 17:36:00.848 | 1.1 ms | UPDATE | UPDATE "a57be577deb434"."tbl_sales_contracts" SET "erp_settle_amount"='0', "erp_un_settle_amount"='0', "erp_all_settle_amount"='0' WHERE "id"=4486 |
| 17:36:00.849 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\SalesContracts', 4486, 'a:0:{}', '', 1001, '221.216.117.119') |
| 17:36:00.849 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:36:00.850 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:36:00.850 | 0.6 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:36:00.852 | 0.9 ms | UPDATE | UPDATE "a57be577deb434"."tbl_projects" SET "collected"='0', "end_at"='now()' WHERE "id"=4174 |
| 17:36:00.853 | 2.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_change_logs" WHERE ("project_id"=4174) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:36:00.856 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Projects', 4174, 'a:1:{s:6:"end_at";s:19:"1970-01-01 08:00:00";}', '', 1001, '221.216.117.119') |
| 17:36:00.856 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:36:00.857 | 56.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_status_logs" WHERE "project_id"=4174 ORDER BY "created_at" DESC |
| 17:36:00.915 | 3.6 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_project_status_logs'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:00.918 | 21.8 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_project_status_logs'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:00.941 | 85.1 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_project_status_logs" ("project_id", "old_status", "new_status", "created_by", "created_at") VALUES (4174, 3, 0, 1001, 'now()') RETURNING "id" |
| 17:36:01.026 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ProjectStatusLogs', 4376, 'a:6:{s:2:"id";i:4376;s:10:"project_id";i:4174;s:10:"new_status";i:0;s:10:"old_status";i:3;s:10:"created_by";i:1001;s:10:"created_at";s:19:"1970-01-01 08:00:00";}', '', 1001, '221.216.117.119') |
| 17:36:01.027 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:36:01.028 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:36:01.029 | 0.3 ms | SELECT | SELECT EXISTS(SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001) |
| 17:36:01.029 | 112.5 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_comments" ("created_by", "object_type", "object_id", "is_system", "description", "description2") VALUES (1001, '1', 4174, TRUE, '此商机已收回全部款项', '商机:销售线索生成20260602001;客户:大姑说的风格') RETURNING "id" |
| 17:36:01.142 | 0.4 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\Comments', 220751, 'a:11:{s:2:"id";i:220751;s:9:"object_id";i:4174;s:11:"object_type";s:1:"1";s:6:"parent";N;s:11:"description";s:30:"此商机已收回全部款项";s:10:"created_by";i:1001;s:10:"created_at";N;s:8:"reply_to";N;s:9:"is_system";b:1;s:8:"for_user";N;s:12:"description2";s:68:"商机:销售线索生成20260602001;客户:大姑说的风格";}', '', 1001, '221.216.117.119') |
| 17:36:01.164 | 0.5 ms | SELECT | SELECT "channel_id" FROM "global"."tbl_logins" WHERE ("id"=1001) AND ("id" != 1001) AND (channel_id IS NOT NULL) |
| 17:36:01.164 | 1.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:36:01.166 | 2.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:36:01.680 | 8.4 ms | SELECT | SELECT "id" FROM "a57be577deb434"."tbl_sales_contracts" WHERE "project_id"=4174 |
| 17:36:01.692 | 7.7 ms | UPDATE | UPDATE "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" SET "reminded"=TRUE WHERE "contract_id"=4486 |
| 17:36:01.706 | 7.0 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:36:01.713 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_object_change_logs" ("act", "attribute", "object_id", "object_type", "created_by", "created_at", "new_value", "old_value", "description") VALUES (2, 'project_status', 4174, 1, 1001, 'now()', '["\u6536\u6b3e\u5b8c\u6210"]', '["\u5546\u673a\u6210\u4ea4"]', '{"d1":"\u5218\u4eba\u8bda","d2":"\u66f4\u65b0\u4e86","d3":"\u5546\u673a\u72b6\u6001","d4":["\u5546\u673a\u6210\u4ea4 <b>\u53d8\u4e3a<\/b> \u6536\u6b3e\u5b8c\u6210"]}') |
| 17:36:01.714 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:36:01.715 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_user_action_logs" ("act", "attribute", "object_id", "object_type", "created_by", "created_at", "new_value", "old_value", "users", "description") VALUES (2, 'project_status', 4174, 1, 1001, 'now()', '["\u6536\u6b3e\u5b8c\u6210"]', '["\u5546\u673a\u6210\u4ea4"]', array[1001], '{"d1":"\u5218\u4eba\u8bda","d2":"\u66f4\u65b0\u4e86","d3":"\u5546\u673a\u72b6\u6001","d4":["\u5546\u673a\u6210\u4ea4 <b>\u53d8\u4e3a<\/b> \u6536\u6b3e\u5b8c\u6210"]}') |
| 17:36:01.715 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contracts" WHERE "id"=4486 |
| 17:36:01.716 | 0.3 ms | UPDATE | UPDATE "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" SET "paid_amount"='0', "status"=0, "overdue_days"=NULL WHERE "contract_id"=4486 |
| 17:36:01.716 | 0.4 ms | SELECT | SELECT r.amount, t.created_at FROM "a57be577deb434"."tbl_erp_cash_cost_ticket_sales_contract_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_cash_cost_tickets" "t" ON r.erp_cash_cost_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (2, 5, 1)) |
| 17:36:01.717 | 0.6 ms | SELECT | SELECT r.amount, t.wrote_date as created_at FROM "a57be577deb434"."tbl_erp_collect_ticket_settles" "r" LEFT JOIN "a57be577deb434"."tbl_erp_collect_tickets" "t" ON r.erp_collect_ticket_id = t.id WHERE ("r"."sales_contract_id"=4486) AND ("t"."status" IN (2, 5, 1)) |
| 17:36:01.717 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:36:01.718 | 0.3 ms | SELECT | SELECT SUM(amount) FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE "contract_id"=4486 |
| 17:36:01.720 | 2.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_change_logs" WHERE ("project_id"=4174) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:36:01.725 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Projects', 4174, 'a:1:{s:6:"end_at";s:19:"2026-06-05 17:35:57";}', '', 1001, '221.216.117.119') |
| 17:36:01.726 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"=3462 |
| 17:36:01.726 | 0.5 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_sales_contract_payment_collection_remind_dates" WHERE ("contract_id"=4486) AND (amount > paid_amount) ORDER BY "remind_date" |
| 17:36:01.727 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_used_clients" WHERE "project_id"=4174 |
| 17:36:01.728 | 6.6 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_project_used_clients'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:01.735 | 28.3 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_project_used_clients'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:01.764 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_used_client_payment_collection_remind_receivers" WHERE 0=1 |
| 17:36:01.764 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_used_client_payment_collection_remind_dates" WHERE 0=1 |
| 17:36:01.765 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_used_client_payments" WHERE 0=1 |
| 17:36:01.765 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_project_used_client_invoices" WHERE 0=1 |
| 17:36:01.766 | 0.4 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='3462' |
| 17:36:01.767 | 7.1 ms | UPDATE | UPDATE "a57be577deb434"."tbl_clients" SET "updated_at"='now()' WHERE "id"=3462 |
| 17:36:01.779 | 11232.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_client_am_change_logs" WHERE ("client_id"=3462) AND ("sales_rep" IS NULL) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:36:13.012 | 1.9 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_client_am_change_logs" ("client_id", "sales_rep", "start_from", "end_at") VALUES (3462, 1001, 'now()', NULL) RETURNING "id" |
| 17:36:13.014 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ClientAmChangeLogs', 199929, 'a:5:{s:2:"id";i:199929;s:9:"client_id";i:3462;s:9:"sales_rep";i:1001;s:10:"start_from";s:5:"now()";s:6:"end_at";N;}', '', 1001, '221.216.117.119') |
| 17:36:13.014 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Clients', 3462, 'a:0:{}', '', 1001, '221.216.117.119') |
| 17:36:13.014 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1001 |
| 17:36:13.015 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_object_change_logs" ("act", "attribute", "object_id", "object_type", "target_id", "target_object_type", "created_by", "new_value", "old_value", "description") VALUES (2, 'update', 3462, 10, 4174, 1, 1001, '[4174]', '[4174]', '{"d1":"\u5218\u4eba\u8bda","d2":"\u66f4\u65b0\u4e86","d3":"\u5546\u673a","d4":["\u9500\u552e\u7ebf\u7d22\u751f\u621020260602001"]}') RETURNING "id" |
| 17:36:13.015 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ObjectChangeLogs', 641355, 'a:13:{s:2:"id";i:641355;s:9:"object_id";s:4:"3462";s:11:"object_type";i:10;s:9:"target_id";i:4174;s:18:"target_object_type";i:1;s:3:"act";i:2;s:9:"attribute";s:6:"update";s:9:"old_value";s:6:"[4174]";s:9:"new_value";s:6:"[4174]";s:11:"description";s:130:"{"d1":"\u5218\u4eba\u8bda","d2":"\u66f4\u65b0\u4e86","d3":"\u5546\u673a","d4":["\u9500\u552e\u7ebf\u7d22\u751f\u621020260602001"]}";s:10:"created_by";i:1001;s:10:"created_at";N;s:9:"is_delete";N;}', '', 1001, '221.216.117.119') |
| 17:36:13.016 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_clients" WHERE "id"='3462' |
| 17:36:13.016 | 0.3 ms | SELECT | SELECT COUNT(*) FROM "a57be577deb434"."tbl_projects" WHERE ("project_status"=3) AND ("bargain_date" >= '2026-01-01 00:00:00') AND ("bargain_date" <= '2026-12-31 23:59:59') AND ("client_id"=3462) |
| 17:36:13.017 | 16.2 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_client_am_change_logs" WHERE ("client_id"=3462) AND ("sales_rep" IS NULL) AND ("end_at" IS NULL) ORDER BY "id" DESC LIMIT 1 |
| 17:36:13.034 | 0.3 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_client_am_change_logs" ("client_id", "sales_rep", "start_from", "end_at") VALUES (3462, 1001, 'now()', NULL) RETURNING "id" |
| 17:36:13.034 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('INSERT', 'app\models\ClientAmChangeLogs', 199930, 'a:5:{s:2:"id";i:199930;s:9:"client_id";i:3462;s:9:"sales_rep";i:1001;s:10:"start_from";s:5:"now()";s:6:"end_at";N;}', '', 1001, '221.216.117.119') |
| 17:36:13.034 | 0.1 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\Clients', 3462, 'a:0:{}', '', 1001, '221.216.117.119') |
| 17:36:13.037 | 0.3 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_projects" WHERE "id"=4174 |
| 17:36:13.038 | 0.9 ms | SELECT | SELECT * FROM "a57be577deb434"."tbl_erp_sales_orders" WHERE ("status" IN (2, 5)) AND ("project_id"=4174) |
| 17:36:13.039 | 4.2 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_erp_sales_orders'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 17:36:13.043 | 21.0 ms | SELECT | select
ct.conname as constraint_name,
a.attname as column_name,
fc.relname as foreign_table_name,
fns.nspname as foreign_table_schema,
fa.attname as foreign_column_name
from
(SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s
FROM pg_constraint ct
) AS ct
inner join pg_class c on c.oid=ct.conrelid
inner join pg_namespace ns on c.relnamespace=ns.oid
inner join pg_attribute a on a.attrelid=ct.conrelid and a.attnum = ct.conkey[ct.s]
left join pg_class fc on fc.oid=ct.confrelid
left join pg_namespace fns on fc.relnamespace=fns.oid
left join pg_attribute fa on fa.attrelid=ct.confrelid and fa.attnum = ct.confkey[ct.s]
where
ct.contype='f'
and c.relname='tbl_erp_sales_orders'
and ns.nspname='a57be577deb434'
order by
fns.nspname, fc.relname, a.attnum |
| 17:36:13.065 | 0.2 ms | INSERT | INSERT INTO "a57be577deb434"."tbl_action_logs" ("action", "object_type", "object_id", "new_value", "old_value", "created_by", "ip_address") VALUES ('UPDATE', 'app\models\ErpSalesOrders', 1711, 'a:0:{}', '', 1001, '221.216.117.119') |
| 17:36:13.069 | 9.0 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "url", "request", "response", "php_error", "time", "duration") VALUES (200, 'a57be577deb434', 1001, 5, 'vue/project/save-edit', '{"Projects":{"id":"4174","client_name":"\u5927\u59d1\u8bf4\u7684\u98ce\u683c","client_id":"3462","project_status":"3","project_progress":"5","profit":"0","profit_pct":"0","bargain_date":"2026-06-02","project_title":"\u9500\u552e\u7ebf\u7d22\u751f\u621020260602001","from_contact_name":"","from_contact":"3649","salesForecast":"181","purchaseType":"128","opportunityFrom":"","contract_type":"1","comment":"\u4e2a\u7535\u996d\u9505\u591a\u5c11","payment_collection_remind_ahead":"1 day","project_product_version_id":"","projectProductRels":"","projectContactPoints":"","projectContactPointRels":"","projectUsedClient":{"used_client":"","budget":"","profit":"","profit_pct":"","projectUsedClientPaymentCollectionRemindReceivers":"","projectUsedClientPaymentCollectionRemindDates":"","remind_ahead":"","projectUsedClientPayments":"","projectUsedClientInvoices":""},"projectProductTypes":{"2":{"budget":"0","profit":"0","pct":"0"}},"projectArchitects":"","projectRemindReceivers":"","salesContractPaymentCollectionRemindReceivers":["1001"],"salesContractPaymentCollectionRemindDates":""},"web_access_token":"l4p3M_87vSdo8QF-blMLH4iPaepKw7vp"}', '{"code":2000,"result":"","status":1,"msg":[{"name":"success","success":"\u5546\u673a\u5df2\u88ab\u6210\u529f\u4fee\u6539","error":""}],"mod":0,"ip":"221.216.117.119","ua":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:151.0) Gecko\/20100101 Firefox\/151.0"}', FALSE, '2026-06-05 17:36:13', 16390425088) RETURNING "id" |