Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating a new database no schema_migrations table is created??? #82

Closed
NielsKSchjoedt opened this issue Oct 17, 2013 · 2 comments
Closed

Comments

@NielsKSchjoedt
Copy link

Hi, When I run Apartment::Database.create('some_name') no schema_migrations table is created in the new database. Why is this?

I'm on the apartment 0.22.1 and rails 4.0.0 using the ruby schema format and i'm using postgres schemas

It seems to be something specifically with my project. I created a new rails app, and it didn't have that issue.

It seems like it's somehow not triggering the CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)statement when running - I wonder why...?

@bradrobertson
Copy link
Contributor

hmm... that's very odd. I've never seen that. All apartment does is load your ruby schema file, which in itself should create the schema_migrations relation.

You say it's fine on a brand new rails project, but on your particular one it doesn't work? Can you think of any gems that might affect this? Possibly a postgres extension gem or something?

@NielsKSchjoedt
Copy link
Author

Okay my bad - I investigated it - somehow - while doing some "stuff" I somehow by accident created a solo schema_migrations table in the else empty hstore schema i have. This was somehow causing all other new schemas to not being created with a schema_migrations table. I think it might be because the hstore schema is in the persistent_schemas config, and hence confused apartment to believe that the table was already there, if I created a new one...

marksiemers pushed a commit to AbleHealth/apartment that referenced this issue Oct 1, 2020
marksiemers pushed a commit to AbleHealth/apartment that referenced this issue Oct 1, 2020
Prepare Release 2.7.1

# Enhancements

- N/a

# Bugfixes

- [Resolves influitive#82] Enhanced db:create breaks plugin compatibility - rails-on-services/apartment#83

# Chores

- Update rake version in development
- Renamed gemspec to match gem name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants