PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_explorer_content` (
	`path` text PRIMARY KEY NOT NULL,
	`owner` integer NOT NULL,
	`title` text NOT NULL,
	`type` text NOT NULL,
	`content` blob,
	`navigable` integer DEFAULT true NOT NULL,
	`private` integer DEFAULT false NOT NULL,
	`order` integer NOT NULL,
	`visit` integer DEFAULT 0 NOT NULL,
	`timestamp` integer NOT NULL,
	FOREIGN KEY (`owner`) REFERENCES `users`(`id`) ON UPDATE cascade ON DELETE cascade
);
--> statement-breakpoint
INSERT INTO `__new_explorer_content`("path", "owner", "title", "type", "content", "navigable", "private", "order", "visit", "timestamp") SELECT "path", "owner", "title", "type", "content", "navigable", "private", "order", "visit", "timestamp" FROM `explorer_content`;--> statement-breakpoint
DROP TABLE `explorer_content`;--> statement-breakpoint
ALTER TABLE `__new_explorer_content` RENAME TO `explorer_content`;--> statement-breakpoint
PRAGMA foreign_keys=ON;--> statement-breakpoint
ALTER TABLE `users_data` ADD `lastTimestamp` integer NOT NULL;--> statement-breakpoint
ALTER TABLE `users_data` ADD `logCount` integer DEFAULT 0 NOT NULL;