Jump to:

22993 Posts in 11829 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » /dev/build/ creating a duplicate column

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1061 Views
  • w1nk5
    Avatar
    Community Member
    25 Posts

    /dev/build/ creating a duplicate column Link to this post

    After moving my project from my development machine (Windows) to my web server (Linux) I ran into the common tablename issue because Windows makes all tablenames lowercase. I fixed this by modifying my dump file and replacing all the tablenames with proper TableName schema Silver Stripe uses.

    Anyways, after doing that the site worked fine.

    Now there are duplicates of each table in the db. For example: sitetree and SiteTree

    However, after adding new page templates and running /build/dev/ i get the following error:

    [User Error] Couldn't run query: ALTER TABLE "SiteTree" ADD "HomepageForDomain" varchar(100) character set utf8 collate utf8_general_ci, CHANGE "ClassName" "ClassName" enum('SiteTree','Page','Forum','ForumHolder','ArticleHolder','ArticlePage','ContactPage','HomePage','ErrorPage','RedirectorPage','VirtualPage') character set utf8 collate utf8_general_ci default 'SiteTree' Duplicate column name 'HomepageForDomain'

    I have all the proper permissions to alter the table so permissions arent the issue.

    It seems for whatever reason it is trying to create a duplicate column name "HomepageForDomain" in the SiteTree table.

    What the hell is going on?

  • w1nk5
    Avatar
    Community Member
    25 Posts

    Re: /dev/build/ creating a duplicate column Link to this post

    bump... c'mon guys I need your help

  • Pigeon
    Avatar
    Community Member
    243 Posts

    Re: /dev/build/ creating a duplicate column Link to this post

    This is almost definately a windows -> linux problem

    The best thing to do is just make a dump of your windows DB, import it to linux, apply the patch (linked below) and it should be all fine.

    See this patch:
    http://open.silverstripe.org/ticket/2476#comment:2

  • BigChris
    Avatar
    Community Member
    63 Posts

    Re: /dev/build/ creating a duplicate column Link to this post

    Not sure this will solve the current duplicate table names but following the info in this other thread might help.

    http://silverstripe.org/general-questions/show/279601?start=0

    Also before you begin setting up Silverstripe on windows ensure mysql has its config edited with the following value
    lower_case_table_names=0

    It will save a lot of pain. I know this as been there and felt the pain.

    Hope that helps.
    Chris

  • BigChris
    Avatar
    Community Member
    63 Posts

    Re: /dev/build/ creating a duplicate column Link to this post

    One other thing I would try is this.
    Back up your database.
    Then delete the column name HomepageForDomain, that is causing a conflict.
    Then try dev build again.

  • w1nk5
    Avatar
    Community Member
    25 Posts

    Re: /dev/build/ creating a duplicate column Link to this post

    Thanks for the responses guys. I'll give it a try tomorrow and let you know how it goes.

    1061 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.