1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-18 11:46:23 -07:00
gochan/oldDBMigration.sql

40 lines
No EOL
980 B
SQL

/*
Migrates the pre-refactor database of april 2020 to database verion 1
rename all tables to table_old
run version 1 population script
filter, copy change data
*/
INSERT INTO DBPREFIXsections (id, name, abbreviation, position, hidden)
SELECT id, name, abbreviation, list_order, hidden > 0
FROM DBPREFIXsections_old;
INSERT INTO DBPREFIXboards (
id,
section_id,
uri,
dir,
navbar_position,
title,
subtitle,
description,
max_file_size,
max_threads,
default_style,
locked,
created_at,
anonymous_name,
force_anonymous,
autosage_after,
no_images_after,
max_message_length,
min_message_length,
allow_embeds,
redirect_to_thread,
require_file,
enable_catalog)
SELECT id, section, dir, dir, list_order, title, subtitle, description, max_file_size, 1000,
default_style, locked, created_on, anonymous, forced_anon, autosage_after, no_images_after, max_message_length, 0, embeds_allowed,
redirect_to_thread, require_file, enable_catalog
FROM DBPREFIXboards_old;