days 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
|
|
1
1
|
class CreateEntries < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :entries do |t|
|
4
|
-
t.string
|
5
|
-
t.text
|
6
|
-
t.text
|
4
|
+
t.string :title, null: false
|
5
|
+
t.text :body, null: false
|
6
|
+
t.text :rendered, null: false
|
7
|
+
t.string :slug, null: false, unique: true
|
8
|
+
t.integer :user_id
|
7
9
|
t.datetime :published_at
|
8
|
-
t.integer :user_id
|
9
|
-
t.string :slug
|
10
10
|
|
11
11
|
t.timestamps
|
12
12
|
end
|
data/lib/days/version.rb
CHANGED
data/scripts/lokka_export.rb
CHANGED
@@ -31,10 +31,10 @@ Post.order('id ASC').all.each do |post|
|
|
31
31
|
hash[:title] = post.title
|
32
32
|
hash[:body] = post.body
|
33
33
|
if post.draft == 1
|
34
|
-
hash[:published_at] = post.created_at
|
35
|
-
else
|
36
34
|
hash[:published_at] = nil
|
37
35
|
hash[:draft] = true
|
36
|
+
else
|
37
|
+
hash[:published_at] = post.created_at
|
38
38
|
end
|
39
39
|
if post.category
|
40
40
|
hash[:category] = [post.category.title]
|