<commit_before>#yaml-migration-config
---
authentification:
  old-database:
    host: <DB_HOST>
    name: <DB-NAME>
    user: <DB-USER>
    password: <<PASSWORD>>
  new-database:
    host: <DB_HOST>
    name: <DB-NAME>
    user: <DB-USER>
    password: <<PASSWORD>>
steps:
- action: COPY
  enabled: true
  old-table: posts
  new-table: fl_posts
  columns:
    id: id
    user_id: user_id
    topic_id: discussion_id
    cooked*: content
    created_at: time
    updated_at: edit_time
- action: RUN_COMMAND
  enabled: true
  command: UPDATE fl_posts SET type='comment'
- action: COPY
  enabled: true
  old-table: topics
  new-table: fl_discussions
  columns:
    id: id
    title: title
    posts_count++: comments_count
    participant_count: participants_count
    created_at: start_time
    user_id: start_user_id
    updated_at: last_time
    last_post_user_id: last_user_id
    slug: slug
    archetype?private_message: is_private
- action: COPY
  enable: true
  old-table: categories
  new-table: fl_tags
  columns:
    id: id
    name: name
    slug: slug
    description: description
    rnd_color**: color
    position: position
    parent_category_id: parent_id
- action: COPY
  enabled: true
  old-table: users
  new-table: fl_users
  columns:
    id: id
    username: username
    email: email
    password_hash: password
    created_at: join_time
    last_posted_at: last_seen_time
- action: RUN_COMMAND
  enabled: true
  command: DELETE FROM fl_users WHERE password='NULL'<commit_msg>Updated migrate.example<commit_after>#yaml-migration-config
---
authentification:
  old-database:
    host: <DB_HOST>
    name: <DB-NAME>
    user: <DB-USER>
    password: <<PASSWORD>>
  new-database:
    host: <DB_HOST>
    name: <DB-NAME>
    user: <DB-USER>
    password: <<PASSWORD>>

steps:
- action: COPY
  enabled: true
  old-table: categories
  new-table: fl_tags
  columns:
    id: id
    name: name
    color: color
    position: position
    parent_category_id: parent_id
    slug: slug
    description: description

- action: COPY
  enabled: true
  old-table: posts
  new-table: fl_posts
  columns:
    id: id
    user_id: user_id
    topic_id: discussion_id
    cooked*: content
    created_at: time
    updated_at: edit_time
- action: RUN_COMMAND
  enabled: true
  command: UPDATE fl_posts SET type='comment'
- action: RUN_COMMAND
  enabled: true
  command: DELETE FROM fl_posts WHERE user_id='-1'

- action: COPY
  enabled: true
  old-table: topics
  new-table: fl_discussions
  columns:
    id: id
    title: title
    posts_count++: comments_count
    participant_count: participants_count
    created_at: start_time
    user_id: start_user_id
    updated_at: last_time
    last_post_user_id: last_user_id
    slug: slug
    archetype?private_message: is_private
- action: RUN_COMMAND
  enabled: true
  command: DELETE FROM fl_discussions WHERE title='Backup completed successfully'

- action: COPY
  enabled: true
  old-table: topics
  new-table: fl_discussions_tags
  columns:
    id: discussion_id
    category_id: tag_id

- action: COPY
  enabled: true
  old-table: users
  new-table: fl_users
  columns:
    id: id
    username: username
    email: email
    password_hash: password
    created_at: join_time
    last_posted_at: last_seen_time
- action: RUN_COMMAND
  enabled: true
  command: DELETE FROM fl_users WHERE password='<PASSWORD>'
{'fraction_non_alphanumeric': 0.08392857142857142, 'fraction_numerical': 0.00029761904761904765, 'mean_word_length': 3.2544303797468355, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1162074', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1148, 'n_words': 303}