Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 784243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:40:56+00:00 2026-05-14T20:40:56+00:00

The current convention where I work is to use SQL Server schemas like namespaces

  • 0

The current convention where I work is to use SQL Server schemas like namespaces (e.g. Company.Employees, Company.Branches, etc.) Is it possible to get an ActiveRecord migration to use anything other than the default “dbo” schema in SQL Server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:40:56+00:00Added an answer on May 14, 2026 at 8:40 pm

    In your migration, supply table names with schema prefix to create_table and drop_table calls.

    create_table("Company.Employees") do |t|
      t.column :name, :string, :limit => 60
      # Other fields here
    end
    

    In the model, override the default table name using set_table_name.

    class Employees < ActiveRecord::Base
      set_table_name "Company.Employees"
    end
    

    On the other hand

    If all the tables used in your rails application belong to the same schema, then you can assign that schema as the default schema for the DB user specified in the database.yml file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The company I work for now uses a set naming convention for their C#
I am tring to make the below application work with SQL Server 2005 Database
Current situation: Ubuntu 8.04 server edition (live server) Postgresql 8.3.7 (from standard repositories) Postgis
Current Application Server Configuration: IIS 6.0 Windows 2003 Server Standard Edition SP2 .NET Framework
I'm current on POS project. User require this application can work both online and
I have a database called MyDB in a Microsoft SQL Server 2008 Express instance
I am trying to use QSerialDevice in Qt to get a connection to my
Assume you work on a remote server from a local emacs shell (started with
At work we make pretty extensive use of Visio drawing as support for documentation.
I am trying to use the following code, but it does not work when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.