FAQ
Folks,

I added a few columns to one of my mysql table and tried
to reload the DB model.

But it hangs ofter displaying below output.


-bash-3.2$ ./apty_create.pl model DB DBIC::Schema Apty::Schema
create=static dbi:mysql:database user password
exists
"/home/apty/script/../lib/Apty/Model"
exists
"/home/apty/script/../t"

^C
-bash-3.2$

I tried to connect to the db
using mysql with above user+password and I am able to connnect.

Any
clue is appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110423/4a4fe540/attachment.htm

Search Discussions

  • Vivek Chhikara at Apr 22, 2011 at 7:34 pm
    I just checked my app trace and below warning also added to list.


    Not inlining a constructor for Apty::Schema since its parent
    DBIx::Class::Schema doesn't contain a 'new' method.
    If you are certain
    you don't need to inline your constructor, specify inline_constructor =>
    0 in your call to Apty::Schema->meta->make_immutable

    On Sat, 23 Apr
    2011 00:08:45 +0530, Vivek Chhikara wrote:
    Folks,

    I added a
    few columns to one of my mysql table and tried to reload the DB model.
    But it hangs ofter displaying below output.

    -bash-3.2$
    ./apty_create.pl model DB DBIC::Schema Apty::Schema create=static
    dbi:mysql:database user password
    exists
    "/home/apty/script/../lib/Apty/Model"
    exists
    "/home/apty/script/../t"
    ^C
    -bash-3.2$

    I tried to connect to
    the db using mysql with above user+password and I am able to connnect.
    >
    Any clue is appreciated.

    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110423/272a7db6/attachment.htm
  • Rohan M at Apr 23, 2011 at 5:26 am
    Hi Vivek,

    Try removing create=static from the command. This parameter is used to
    create the table structure automatically from the database.

    Just to cross check whether you app is in working try doing following.
    1) Create a table class in lib->Apty->Schema->Result->Table.pm
    2) In Schema directory add Schema.pm with following
    package Apty::Schema;

    use strict;
    use warnings;

    use base 'DBIx::Class::Schema';

    __PACKAGE__->load_namespaces;


    # Created by DBIx::Class::Schema::Loader v0.04006 @ 2011-02-22 16:47:06
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:foYv+STv7emsvGCJ4mWjIg


    # You can replace this text with custom content, and it will be preserved on
    regeneration
    1;

    3) Table.pm
    package Apty::Schema::Result::Table.pm
    use strict;
    use warnings;

    use base 'DBIx::Class';

    __PACKAGE__->load_components("InflateColumn::DateTime", "Core");
    __PACKAGE__->table("Table");
    __PACKAGE__->add_columns(
    "id",
    { data_type => "INT", default_value => undef, is_nullable => 0, size => 20
    },
    "value",
    {
    data_type => "TEXT",
    default_value => undef,
    is_nullable => 0,
    size => 65535,
    },
    );

    # Created by DBIx::Class::Schema::Loader v0.04006 @ 2011-02-22 16:47:06
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oogTrnt1wIwBbA7hgj7axA


    # You can replace this text with custom content, and it will be preserved on
    regeneration
    1;

    If above thing works out then there is certainly problem with db side. May
    be relations are not properly set.

    Also if it doesn't work try comment out __Package=>immutable thing.

    Hope this works..

    On Sat, Apr 23, 2011 at 1:04 AM, Vivek Chhikara wrote:

    I just checked my app trace and below warning also added to list.


    Not inlining a constructor for Apty::Schema since its parent DBIx::Class::Schema doesn't contain a 'new' method.
    If you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to Apty::Schema->meta->make_immutable



    On Sat, 23 Apr 2011 00:08:45 +0530, Vivek Chhikara wrote:

    Folks,

    I added a few columns to one of my mysql table and tried to reload the DB
    model.

    But it hangs ofter displaying below output.

    -bash-3.2$ ./apty_create.pl model DB DBIC::Schema Apty::Schema create=static dbi:mysql:database user password
    exists "/home/apty/script/../lib/Apty/Model"
    exists "/home/apty/script/../t"

    ^C
    -bash-3.2$



    I tried to connect to the db using mysql with above user+password and I am able to connnect.



    Any clue is appreciated.






    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/

    --
    रोहन मल�लेल�रवार

    b
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110423/40d2afe8/attachment.htm
  • Vivek Chhikara at Apr 25, 2011 at 9:24 am
    Merely removing the create option makes this commend execute
    successfully.

    I have updated the table schema manually.

    Thanks for
    your suggestion.

    But now the question is why it hangs with
    create=static option?

    is it because of some permission issue.

    all
    the *.pm files are owned by same user and run by same user. can there be
    any thing else which i m missing here?

    On Sat, 23 Apr 2011 10:56:38
    +0530, Rohan M wrote:
    Hi Vivek,
    Try removing create=static from
    the command. This parameter is used to create the table structure
    automatically from the database.
    Just to cross check whether you app
    is in working try doing following.
    1) Create a table class in
    lib->Apty->Schema->Result->Table.pm
    2) In Schema directory add
    Schema.pm with following
    package Apty::Schema;
    use strict;
    use warnings;
    use base 'DBIx::Class::Schema';
    __PACKAGE__->load_namespaces;
    # Created by
    DBIx::Class::Schema::Loader v0.04006 @ 2011-02-22 16:47:06
    # DO NOT
    MODIFY THIS OR ANYTHING ABOVE! md5sum:foYv+STv7emsvGCJ4mWjIg
    # You
    can replace this text with custom content, and it will be preserved on
    regeneration
    1;
    3) Table.pm
    package
    Apty::Schema::Result::Table.pm
    use strict;
    use warnings;
    use
    base 'DBIx::Class';
    >
    __PACKAGE__->load_components("InflateColumn::DateTime", "Core");
    >
    __PACKAGE__->table("Table");
    __PACKAGE__->add_columns(
    "id",
    {
    data_type => "INT", default_value => undef, is_nullable => 0, size => 20
    },
    "value",
    {
    data_type => "TEXT",
    default_value => undef,
    is_nullable => 0,
    size => 65535,
    },
    );
    # Created by
    DBIx::Class::Schema::Loader v0.04006 @ 2011-02-22 16:47:06
    # DO NOT
    MODIFY THIS OR ANYTHING ABOVE! md5sum:oogTrnt1wIwBbA7hgj7axA
    # You
    can replace this text with custom content, and it will be preserved on
    regeneration
    1;
    If above thing works out then there is certainly
    problem with db side. May be relations are not properly set.
    Also if
    it doesn't work try comment out __Package=>immutable thing.
    Hope this works..
    On Sat, Apr 23, 2011 at 1:04 AM, Vivek Chhikara wrote:
    I just checked my app trace and below warning also added to list.
    Not inlining a constructor for Apty::Schema since its parent
    DBIx::Class::Schema doesn't contain a 'new' method.
    If you are
    certain you don't need to inline your constructor, specify
    inline_constructor => 0 in your call to
    Apty::Schema->meta->make_immutable
    On Sat, 23 Apr 2011 00:08:45
    +0530, Vivek Chhikara wrote:
    Folks,

    I added a few
    columns to one of my mysql table and tried to reload the DB model.
    >>>
    But it hangs ofter displaying below output.

    -bash-3.2$
    ./apty_create.pl [1] model DB DBIC::Schema Apty::Schema create=static
    dbi:mysql:database user password
    exists
    "/home/apty/script/../lib/Apty/Model"
    exists
    "/home/apty/script/../t"
    ^C
    -bash-3.2$

    I tried to
    connect to the db using mysql with above user+password and I am able to
    connnect.
    Any clue is appreciated.
    _______________________________________________
    List:
    Catalyst@lists.scsys.co.uk [2]
    Listinfo:
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst [3]
    >>
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ [4]
    Dev site:
    http://dev.catalyst.perl.org/ [5]
    --
    रोहन मल�लेल�रवार

    b



    Links:
    ------
    [1] http://apty_create.pl
    [2]
    mailto:Catalyst@lists.scsys.co.uk
    [3]
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    [4]
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    [5]
    http://dev.catalyst.perl.org/
    [6] mailto:vivek@chhikara.org
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110425/949d5d64/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedApr 22, '11 at 6:38p
activeApr 25, '11 at 9:24a
posts4
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Vivek Chhikara: 3 posts Rohan M: 1 post

People

Translate

site design / logo © 2021 Grokbase