first commit

This commit is contained in:
Sabic
2024-08-07 16:43:33 +02:00
commit f3b67b0800
111 changed files with 1993 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
class CreateArticles < ActiveRecord::Migration[7.1]
def change
create_table :articles do |t|
t.string :title
t.text :body
t.timestamps
end
end
end

View File

@@ -0,0 +1,11 @@
class CreateComments < ActiveRecord::Migration[7.1]
def change
create_table :comments do |t|
t.string :commenter
t.text :body
t.references :article, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@@ -0,0 +1,5 @@
class AddStatusToArticles < ActiveRecord::Migration[7.1]
def change
add_column :articles, :status, :string, default: "public"
end
end

View File

@@ -0,0 +1,5 @@
class AddStatusToComments < ActiveRecord::Migration[7.1]
def change
add_column :comments, :status, :string, default: "public"
end
end

View File

@@ -0,0 +1,8 @@
class CreateUsers < ActiveRecord::Migration[7.1]
def change
create_table :users do |t|
t.timestamps
end
end
end