差分

移動先: 案内検索

Tep3

1,450 バイト追加, 2022年2月24日 (木) 06:28
Categories → Lists
...
</pre>
リストID<pre>インポート\COPY lists(id, user_id, note_id, content, line, created_at, updated_at) FROM '/Users/jq/3tep_gomi/list_1.csv' WITH CSV DELIMITER ','; ...</pre>==== ListsのidをClientsのlist_idに入れる ====<pre>tepnote::DATABASE=> select * from categories where id = 70; id | user_id | jiin_id | content | set_id | created_at | updated_at | line ----+---------+---------+---------+--------+----------------------------+----------------------------+------ 70 | 1 | 1 | 別所 | 1 | 2021-06-16 02:13:29.941705 | 2021-06-30 23:36:32.003691 | 2</pre><pre>tepnote::DATABASE=> select * from properties where jiin_id = 1 and ie_id = 2597; id | user_id | jiin_id | client_id | ie_id | tiku_id | category_id | tana | tuki | nenga | yaku | eitai | name | created_at | updated_at | category_3 | category_4 | category_5 | nenkai_h | goji | haru | aki | yaku_g ----+---------+---------+-----------+-------+---------+-------------+------+------+-------+------+-------+------+----------------------------+----------------------------+------------+------------+------------+----------+------+------+-----+-------- 64 | 2 | 1 | 1060 | 2597 | 70 | 101 | t | f | t | t | f | f | 2019-03-07 16:16:19.197973 | 2021-08-25 23:47:50.265849 | | | | t | t | t | t | f</pre>
<pre>
\COPY (select properties.ie_id as id, categories.id as list_id from categories join properties on categories.id = properties.tiku_id where categories.jiin_id = 1 order by properties.ie_id asc) TO '/Users/jq/3tep_gomi/ie_id_list_id_1.csv' WITH CSV DELIMITER ',' FORCE QUOTE * NULL AS '' HEADER;
UPDATE clients SET list_id = x_list_id.list_id FROM x_list_id WHERE clients.id = x_list_id.client_id;
</pre>
 
<pre>

案内メニュー