initial commit
https://guides.rubyonrails.org/getting_started.html#creating-a-database-model
This commit is contained in:
13
db/migrate/20250910133346_create_projects.rb
Normal file
13
db/migrate/20250910133346_create_projects.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateProjects < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :projects do |t|
|
||||
t.string :name
|
||||
t.string :email
|
||||
t.string :shortname
|
||||
t.date :offer_date
|
||||
t.date :order_date
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
9
db/seeds.rb
Normal file
9
db/seeds.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# This file should ensure the existence of records required to run the application in every environment (production,
|
||||
# development, test). The code here should be idempotent so that it can be executed at any point in every environment.
|
||||
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
|
||||
# MovieGenre.find_or_create_by!(name: genre_name)
|
||||
# end
|
||||
Reference in New Issue
Block a user