Closed harshith30 closed 10 years ago
Try this step from terminal,
bundle exec rake install:base RAILS_ENV='production'
Can you please come up with a patch if that resolves your issue ?
You can see @joffems earlier patches for reference.
I hope @joffems will help/guide you to make your first contribution.
That settings table not defined comment is fine. I can strip out the warning.
You can see the wource of the message at https://github.com/msjit/testcasedb/blob/master/config/initializers/omniauth.rb
Essentially, we need to ignore the initialization when the DB has been migrated yet.
I've commented out the warning message
Hi, When i try to migrate db i get the above message , I did a fresh installation of project and database.
harshith@harshith-Inspiron-3520:~/testcasedb$ script/setup -p Generated config/app_config.yml Updated secret key Migrating production database Installing base function
harshith@harshith-Inspiron-3520:~/testcasedb$ bundle exec rake db:migrate RAILS_ENV=production --trace * Invoke db:migrate (first_time) * Invoke environment (first_time) \ Execute environment
Settings table not defined yet
* Invoke db:load_config (first_time) * Execute db:load_config \ Execute db:migrate
== CreateProducts: migrating ================================================= -- create_table(:products) -> 0.0994s == CreateProducts: migrated (0.0996s) ========================================
== CreateTestCases: migrating ================================================ -- create_table(:test_cases) -> 0.0765s == CreateTestCases: migrated (0.0767s) =======================================
== AddProductToTestCase: migrating =========================================== -- add_column(:test_cases, :product_id, :integer) -> 0.1736s == AddProductToTestCase: migrated (0.1737s) ==================================
== CreateTestTypes: migrating ================================================ -- create_table(:test_types) -> 0.0771s == CreateTestTypes: migrated (0.0772s) =======================================
== AddTestTypeToTestCase: migrating ========================================== -- add_column(:test_cases, :test_type_id, :integer) -> 0.2113s == AddTestTypeToTestCase: migrated (0.2115s) =================================
== CreateSteps: migrating ==================================================== -- create_table(:steps) -> 0.0771s == CreateSteps: migrated (0.0772s) ===========================================
== AddStepTestCaseJoinTable: migrating ======================================= -- create_table(:steps_test_cases, {:id=>false}) -> 0.0773s == AddStepTestCaseJoinTable: migrated (0.0775s) ==============================
== RemoveTestTypeCreated: migrating ========================================== -- remove_column(:test_types, :created) -> 0.1667s == RemoveTestTypeCreated: migrated (0.1669s) =================================
== ChangeStepsToTestCaseRelationship: migrating ============================== -- drop_table(:steps_test_cases) -> 0.0309s -- add_column(:steps, :test_case_id, :integer) -> 0.1676s == ChangeStepsToTestCaseRelationship: migrated (0.1988s) =====================
== CreateTestPlans: migrating ================================================ -- create_table(:test_plans) -> 0.0640s == CreateTestPlans: migrated (0.0642s) =======================================
== AddProductIdToTestPlan: migrating ========================================= -- add_column(:test_plans, :product_id, :integer) -> 0.1654s == AddProductIdToTestPlan: migrated (0.1656s) ================================
== CreatePlanCases: migrating ================================================ -- create_table(:plan_cases) -> 0.0752s == CreatePlanCases: migrated (0.0755s) =======================================
== CreateVersions: migrating ================================================= -- create_table(:versions) -> 0.0752s == CreateVersions: migrated (0.0754s) ========================================
== ChangeVersionProductIdDataType: migrating ================================= -- change_table(:versions) -> 0.0877s == ChangeVersionProductIdDataType: migrated (0.0879s) ========================
== CreateUsers: migrating ==================================================== -- create_table(:users) -> 0.0874s == CreateUsers: migrated (0.0876s) ===========================================
== AddRoleToUser: migrating ================================================== -- add_column(:users, :role, :integer, {:limit=>1}) -> 0.2004s == AddRoleToUser: migrated (0.2005s) =========================================
== CreateHistories: migrating ================================================ -- create_table(:histories) -> 0.0653s == CreateHistories: migrated (0.0654s) =======================================
== CreateComments: migrating ================================================= -- create_table(:comments) -> 0.0763s == CreateComments: migrated (0.0764s) ========================================
== AddTestCaseToComment: migrating =========================================== -- add_column(:comments, :test_case_id, :integer) -> 0.1789s == AddTestCaseToComment: migrated (0.1790s) ==================================
== AddTestCaseIdToComments: migrating ======================================== -- add_column(:comments, :test_plan_id, :integer) -> 0.2106s == AddTestCaseIdToComments: migrated (0.2107s) ===============================
== AddActiveToUsers: migrating =============================================== -- add_column(:users, :active, :boolean) -> 0.1782s == AddActiveToUsers: migrated (0.1783s) ======================================
== CreateCategories: migrating =============================================== -- create_table(:categories) -> 0.0653s == CreateCategories: migrated (0.0654s) ======================================
== AddCategoryIdToTestCase: migrating ======================================== -- add_column(:test_cases, :category_id, :integer) -> 0.2846s == AddCategoryIdToTestCase: migrated (0.2848s) ===============================
== RemoveProductIdFromTestCase: migrating ==================================== -- remove_column(:test_cases, :product_id) -> 0.2670s == RemoveProductIdFromTestCase: migrated (0.2671s) ===========================
== CreateSettings: migrating ================================================= -- create_table(:settings) -> 0.0660s == CreateSettings: migrated (0.0661s) ========================================
== AddDescriptionToSettings: migrating ======================================= -- add_column(:settings, :description, :string) -> 0.1662s == AddDescriptionToSettings: migrated (0.1663s) ==============================
== CreateUploads: migrating ================================================== -- create_table(:uploads) -> 0.0763s == CreateUploads: migrated (0.0764s) =========================================
== AddUploadColumnsToUpload: migrating ======================================= -- add_column(:uploads, :upload_file_name, :string) -> 0.2234s -- add_column(:uploads, :upload_content_type, :string) -> 0.2012s -- add_column(:uploads, :upload_file_size, :integer) -> 0.2124s -- add_column(:uploads, :upload_updated_at, :datetime) -> 0.2679s == AddUploadColumnsToUpload: migrated (0.9054s) ==============================
== AddTestCaseIdColumnToUploads: migrating =================================== -- add_column(:uploads, :test_case_id, :integer) -> 0.2216s == AddTestCaseIdColumnToUploads: migrated (0.2218s) ==========================
== AddProductIdToTestCase: migrating ========================================= -- add_column(:test_cases, :product_id, :integer) -> 0.2108s == AddProductIdToTestCase: migrated (0.2110s) ================================
== CreateAssignments: migrating ============================================== -- create_table(:assignments) -> 0.0641s == CreateAssignments: migrated (0.0644s) =====================================
== CreateResults: migrating ================================================== -- create_table(:results) -> 0.0751s == CreateResults: migrated (0.0753s) =========================================
== AddResultIdToUploads: migrating =========================================== -- add_column(:uploads, :result_id, :integer) -> 0.1651s == AddResultIdToUploads: migrated (0.1653s) ==================================
== ChangeOrderColumnToStepOrder: migrating =================================== -- rename_column(:steps, :order, :step_number) -> 0.2337s == ChangeOrderColumnToStepOrder: migrated (0.2340s) ==========================
== ChangePlanCaseOrderColumnToCaseOrder: migrating =========================== -- rename_column(:plan_cases, :order, :case_order) -> 0.1768s == ChangePlanCaseOrderColumnToCaseOrder: migrated (0.1771s) ==================
== CreateReports: migrating ================================================== -- create_table(:reports) -> 0.0763s == CreateReports: migrated (0.0764s) =========================================
== UpdateHistoriesTable: migrating =========================================== -- remove_column(:histories, :result_case_id) -> 0.2106s -- add_column(:histories, :result_id, :integer) -> 0.2012s -- add_column(:histories, :assignment_id, :integer) -> 0.1680s == UpdateHistoriesTable: migrated (0.5802s) ==================================
== AddMoreColumnsToHistories: migrating ====================================== -- add_column(:histories, :product_id, :integer) -> 0.1875s -- add_column(:histories, :category_id, :integer) -> 0.1789s == AddMoreColumnsToHistories: migrated (0.3668s) =============================
== CreateTasks: migrating ==================================================== -- create_table(:tasks) -> 0.0879s == CreateTasks: migrated (0.0881s) ===========================================
== AddNameToTasks: migrating ================================================= -- add_column(:tasks, :name, :string) -> 0.2329s == AddNameToTasks: migrated (0.2331s) ========================================
== AddTaskIdToComments: migrating ============================================ -- add_column(:comments, :task_id, :integer) -> 0.2551s == AddTaskIdToComments: migrated (0.2553s) ===================================
== AddTaskIdToHistories: migrating =========================================== -- add_column(:histories, :task_id, :integer) -> 0.2108s == AddTaskIdToHistories: migrated (0.2110s) ==================================
== AddAssignmentIdToTasks: migrating ========================================= -- add_column(:tasks, :assignment_id, :integer) -> 0.1661s == AddAssignmentIdToTasks: migrated (0.1663s) ================================
== AddUserIdToReports: migrating ============================================= -- add_column(:reports, :user_id, :integer) -> 0.2099s == AddUserIdToReports: migrated (0.2101s) ====================================
== AddExecutedAtToResults: migrating ========================================= -- add_column(:results, :executed_at, :datetime) -> 0.7604s == AddExecutedAtToResults: migrated (0.7605s) ================================
== AddBugsColumnToResults: migrating ========================================= -- add_column(:results, :bugs, :string) -> 0.3415s == AddBugsColumnToResults: migrated (0.3417s) ================================
== AddTimeZoneToUsers: migrating ============================================= -- add_column(:users, :time_zone, :string) -> 0.2770s == AddTimeZoneToUsers: migrated (0.2771s) ====================================
== AddFailedLoginCountToUser: migrating ====================================== -- add_column(:users, :failed_login_count, :integer, {:limit=>1}) -> 0.3219s == AddFailedLoginCountToUser: migrated (0.3222s) =============================
== AddStatusToTestCases: migrating =========================================== -- add_column(:test_cases, :status, :integer, {:limit=>2}) -> 0.1768s == AddStatusToTestCases: migrated (0.1770s) ==================================
== AddStatusToTestPlans: migrating =========================================== -- add_column(:test_plans, :status, :integer, {:limit=>2}) -> 0.1649s == AddStatusToTestPlans: migrated (0.1652s) ==================================
== AddVersionAndParentToTestCase: migrating ================================== -- add_column(:test_cases, :version, :integer, {:limit=>2, :default=>1}) -> 0.1764s -- add_column(:test_cases, :parent_id, :integer) -> 0.1788s == AddVersionAndParentToTestCase: migrated (0.3557s) =========================
== AddDeprecatedToTestCases: migrating ======================================= -- add_column(:test_cases, :deprecated, :boolean, {:default=>false}) -> 0.1762s == AddDeprecatedToTestCases: migrated (0.1765s) ==============================
== AddVersionsToTestPlans: migrating ========================================= -- add_column(:test_plans, :version, :integer, {:limit=>2, :default=>1}) -> 0.2109s -- add_column(:test_plans, :parent_id, :integer) -> 0.2121s -- add_column(:test_plans, :deprecated, :boolean, {:default=>false}) -> 0.2011s == AddVersionsToTestPlans: migrated (0.6249s) ================================
== AddSingleAccessTokenToUsers: migrating ==================================== -- add_column(:users, :single_access_token, :string) -> 0.1654s == AddSingleAccessTokenToUsers: migrated (0.1656s) ===========================
== CreateCustomFields: migrating ============================================= -- create_table(:custom_fields) -> 0.0753s == CreateCustomFields: migrated (0.0755s) ====================================
== CreateCustomItems: migrating ============================================== -- create_table(:custom_items) -> 0.0874s == CreateCustomItems: migrated (0.0876s) =====================================
== CreateDevices: migrating ================================================== -- create_table(:devices) -> 0.0875s == CreateDevices: migrated (0.0877s) =========================================
== CreateSchedules: migrating ================================================ -- create_table(:schedules) -> 0.0803s == CreateSchedules: migrated (0.0805s) =======================================
== CreateScheduleRuns: migrating ============================================= -- create_table(:schedule_runs) -> 0.0861s == CreateScheduleRuns: migrated (0.0863s) ====================================
== CreateScheduleUsers: migrating ============================================ -- create_table(:schedule_users) -> 0.0756s == CreateScheduleUsers: migrated (0.0759s) ===================================
== AddUsersToTestCases: migrating ============================================ -- add_column(:test_cases, :created_by_id, :integer) -> 0.1650s -- add_column(:test_cases, :modified_by_id, :integer) -> 0.2137s == AddUsersToTestCases: migrated (0.3792s) ===================================
== AddUsersToTestPlans: migrating ============================================ -- add_column(:test_plans, :created_by_id, :integer) -> 0.1994s -- add_column(:test_plans, :modified_by_id, :integer) -> 0.2234s == AddUsersToTestPlans: migrated (0.4232s) ===================================
== CreateTags: migrating ===================================================== -- create_table(:tags) -> 0.0872s == CreateTags: migrated (0.0874s) ============================================
== TagsTestcases: migrating ================================================== -- create_table(:tag_test_cases, {:id=>false}) -> 0.0748s == TagsTestcases: migrated (0.0751s) =========================================
== CreateTestCaseTargets: migrating ========================================== -- create_table(:test_case_targets) -> 0.0974s == CreateTestCaseTargets: migrated (0.0976s) =================================
== CreateResultStatistics: migrating ========================================= -- create_table(:result_statistics) -> 0.1197s == CreateResultStatistics: migrated (0.1199s) ================================
== AddScheduleIdToAssignments: migrating ===================================== -- add_column(:assignments, :schedule_id, :integer) -> 0.1774s == AddScheduleIdToAssignments: migrated (0.1776s) ============================
== CreateProductUsers: migrating ============================================= -- create_table(:product_users) -> 0.1649s == CreateProductUsers: migrated (0.1651s) ====================================
== AddUserLastRequestAt: migrating =========================================== -- add_column(:users, :last_request_at, :datetime) -> 0.2540s == AddUserLastRequestAt: migrated (0.2543s) ==================================
== CreateStencils: migrating ================================================= -- create_table(:stencils) -> 0.0776s == CreateStencils: migrated (0.0778s) ========================================
== CreateStencilTestPlans: migrating ========================================= -- create_table(:stencil_test_plans) -> 0.0819s == CreateStencilTestPlans: migrated (0.0821s) ================================
== AddStencilIdToAssignments: migrating ====================================== -- add_column(:assignments, :stencil_id, :integer) -> 0.1774s == AddStencilIdToAssignments: migrated (0.1776s) =============================
== AddDeviceIdToResults: migrating =========================================== -- add_column(:results, :device_id, :integer) -> 0.1651s == AddDeviceIdToResults: migrated (0.1653s) ==================================
== AddStencilIdToHistories: migrating ======================================== -- add_column(:histories, :stencil_id, :integer) -> 0.2996s == AddStencilIdToHistories: migrated (0.2998s) ===============================
== AddParentIdToStencils: migrating ========================================== -- add_column(:stencils, :parent_id, :integer) -> 0.1874s == AddParentIdToStencils: migrated (0.1877s) =================================
== AddDeviceIdToCustomItems: migrating ======================================= -- add_column(:custom_items, :device_id, :integer) -> 0.2320s == AddDeviceIdToCustomItems: migrated (0.2322s) ==============================
== AddSecondVersionIdToReports: migrating ==================================== -- add_column(:reports, :second_version_id, :integer) -> 0.1662s == AddSecondVersionIdToReports: migrated (0.1663s) ===========================
== CreateSettingsGoogleAuth: migrating ======================================= == CreateSettingsGoogleAuth: migrated (0.2542s) ==============================
== CreateAuthentications: migrating ========================================== -- create_table(:authentications) -> 0.0870s == CreateAuthentications: migrated (0.0871s) =================================
* Invoke db:_dump (first_time) * Execute db:_dump * Invoke db:schema:dump (first_time) * Invoke environment * Invoke db:load_config * Execute db:schema:dump
And also the default user is not created.
mysql> show tables; +---------------------------+ | Tables_in_tcdb_production | +---------------------------+ | assignments | | authentications | | categories | | comments | | custom_fields | | custom_items | | devices | | histories | | plan_cases | | product_users | | products | | reports | | result_statistics | | results | | schedule_runs | | schedule_users | | schedules | | schema_migrations | | settings | | stencil_test_plans | | stencils | | steps | | tag_test_cases | | tags | | tasks | | test_case_targets | | test_cases | | test_plans | | test_types | | uploads | | users | | versions | +---------------------------+ 32 rows in set (0.00 sec)
mysql> select * from users; Empty set (0.00 sec)
If there is any need for additional information i'm happy to provide them.
Harshith