add models for Project, Task, Note, Category
This commit is contained in:
11
db/migrate/20250611163105_create_project_categories.rb
Normal file
11
db/migrate/20250611163105_create_project_categories.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateProjectCategories < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :project_categories do |t|
|
||||
t.string :title
|
||||
t.text :description
|
||||
t.integer :order
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20250611163700_create_contacts.rb
Normal file
13
db/migrate/20250611163700_create_contacts.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateContacts < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :contacts do |t|
|
||||
t.string :name
|
||||
t.string :email
|
||||
t.string :address
|
||||
t.float :geo_long
|
||||
t.float :geo_lat
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20250611172549_create_phone_numbers.rb
Normal file
11
db/migrate/20250611172549_create_phone_numbers.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreatePhoneNumbers < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :phone_numbers do |t|
|
||||
t.string :phone_number
|
||||
t.integer :type
|
||||
t.references :contact, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
14
db/migrate/20250611172728_create_projects.rb
Normal file
14
db/migrate/20250611172728_create_projects.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateProjects < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :projects do |t|
|
||||
t.string :title
|
||||
t.string :website
|
||||
t.string :email
|
||||
t.integer :business_type
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.references :project_category, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
15
db/migrate/20250611173502_create_tasks.rb
Normal file
15
db/migrate/20250611173502_create_tasks.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateTasks < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :tasks do |t|
|
||||
t.string :title
|
||||
t.text :description
|
||||
t.integer :priority
|
||||
t.integer :status
|
||||
t.integer :type
|
||||
t.date :due_date
|
||||
t.references :user, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20250611174428_create_notes.rb
Normal file
13
db/migrate/20250611174428_create_notes.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateNotes < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :notes do |t|
|
||||
t.string :title
|
||||
t.text :description
|
||||
t.boolean :pinned
|
||||
t.boolean :archived
|
||||
t.references :project, null: false, foreign_key: true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user