-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
ALTER TABLE `feeds` ADD `top` integer DEFAULT 0 NOT NULL; | ||
CREATE TABLE IF NOT EXISTS `feeds_new` ( | ||
`id` integer PRIMARY KEY NOT NULL, | ||
`alias` text, | ||
`title` text, | ||
`content` text NOT NULL, | ||
`summary` text DEFAULT '' NOT NULL, | ||
`listed` integer DEFAULT 1 NOT NULL, | ||
`draft` integer DEFAULT 1 NOT NULL, | ||
`uid` integer NOT NULL, | ||
`top` integer DEFAULT 0 NOT NULL, | ||
`created_at` integer DEFAULT (unixepoch()) NOT NULL, | ||
`updated_at` integer DEFAULT (unixepoch()) NOT NULL, | ||
FOREIGN KEY (`uid`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action | ||
); | ||
--> statement-breakpoint | ||
INSERT INTO `feeds_new` (`id`, `alias`, `title`, `content`, `summary`, `listed`, `draft`, `uid`, `created_at`, `updated_at`) | ||
SELECT `id`, `alias`, `title`, `content`, `summary`, `listed`, `draft`, `uid`, `created_at`, `updated_at` | ||
FROM `feeds`; | ||
--> statement-breakpoint | ||
DROP TABLE `feeds`; | ||
--> statement-breakpoint | ||
ALTER TABLE `feeds_new` RENAME TO `feeds`; |