Code Monkey home page Code Monkey logo

Comments (6)

fatkodima avatar fatkodima commented on July 4, 2024

Hey @GitToTheHub we reserve the Rails Issues tracker for bugs in the framework as we don't have the bandwidth to offer application support. Please use stackoverflow or the Rails forum for help with your application. Thanks for understanding.

from rails.

GitToTheHub avatar GitToTheHub commented on July 4, 2024

Hey @fatkodima, thanks for the explanation, I understand this. When there is no functionality for generating a migration for renaming a table, where can i report this. In the Rails forum?

from rails.

fatkodima avatar fatkodima commented on July 4, 2024

You can ask on the forum if the feature is something people want to see in the framework. Personally, I don't think it is needed, but maybe someone else think the opposite.

We have some "meta-syntax" for other migration-related generators

case file_name
when /^(add)_.*_to_(.*)/, /^(remove)_.*?_from_(.*)/
@migration_action = $1
@table_name = normalize_table_name($2)
when /join_table/
if attributes.length == 2
@migration_action = "join"
@join_tables = pluralize_table_names? ? attributes.map(&:plural_name) : attributes.map(&:singular_name)
set_index_names
end
when /^create_(.+)/
@table_name = normalize_table_name($1)
@migration_template = "create_table_migration.rb"
end
, maybe we can extend it.

from rails.

GitToTheHub avatar GitToTheHub commented on July 4, 2024

Cool, thanks for the code where i can find it. I know that it is not absolutely necessary. It would just be for the sake of completeness.

from rails.

simi avatar simi commented on July 4, 2024

Cool, thanks for the code where i can find it. I know that it is not absolutely necessary. It would just be for the sake of completeness.

AFAIK there is nothing like completeness goal in here. There are 2 basic cases guessed from migration name to cover the most used and simple commands.

Renaming table is relatively tricky operation in common production runtime and instead of renaming, you can rename model and point to original table name.

from rails.

GitToTheHub avatar GitToTheHub commented on July 4, 2024

Renaming table is relatively tricky operation in common production runtime and instead of renaming, you can rename model and point to original table name.

ok, I don’t have much experience here. Why it is a tricky operation?

from rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.