-- user_settings
CREATE TABLE
	user_settings(
		"id" SERIAL,
		"user_id" INTEGER NOT NULL,
		"use_fallback_for_date_and_time_inputs" BOOLEAN NOT NULL,
		"weekview_vertical_default" BOOLEAN NOT NULL,
		FOREIGN KEY ("user_id") REFERENCES "users"("id"),
		UNIQUE ("user_id"),
		UNIQUE ("id")
	)
;

INSERT INTO
	user_settings(
		user_id,
		use_fallback_for_date_and_time_inputs,
		weekview_vertical_default
	)
	SELECT
		id AS user_id,
		FALSE,
		FALSE
	FROM
		users
;

-- revision
UPDATE
	_meta
SET
	revision = 'r7'
;

