Yii Framework Forum: Yii skeleton app - Yii Framework Forum

Jump to content

  • (9 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • This topic is locked

Yii skeleton app Rate Topic: -----

#21 User is offline   mocapapa 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 428
  • Joined: 04-January 09
  • Location:Tokyo, JAPAN

Posted 15 February 2009 - 06:03 AM

Thanks Bios,
I have registered three issues.
0

#22 User is offline   creator 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 14-February 09

Posted 15 February 2009 - 09:18 AM

thanks Jonah it works perfect now!

I can't say that i've encountered the problems that mocapapa has seen.
0

#23 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 15 February 2009 - 01:05 PM

Quote

Thanks Bios,

I have registered three issues.

One fixed and closed, One I'm testing still and the uppercase Database bug is strange... But i had to use caps too so your not alone.


The table "User" for active record class "User" cannot be found in the database.

01713:            throw new CDbException(Yii::t('yii','The table "{table}" for
active record class "{class}" cannot be found in the database.',

system.db.CDbCommand  query with SQL: SHOW COLUMNS FROM `User`


Looking at the docs, I'm beginning to think this isn't a bug but intended.

EDIT: I'm declaring this a bug with the SQL script, And not a bug with the Skeleton. The demo scripts all use Capitalized names.
0

#24 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 15 February 2009 - 05:25 PM

Thanks for getting that up Bios Element

I will also watch the bug list and make fixes in my version (and possibly send the fixes to you, not sure yet).  I can't help but reply to messages on this thread but I really need to get some homework done and thus resisting the urge to spend some time to figure out sub-version and google code

I would like qiang to make a comment on the table case issue before fixing it (I like table to be lower case).

I will try to figure out SVN before working on the skeleton anymore if I can help it

And I would like to remind everyone that the skeleton requires the current nightly version of Yii (if not the svn version)
0

#25 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 15 February 2009 - 05:29 PM

Quote

Thanks for getting that up Bios Element



I will also watch the bug list and make fixes in my version (and possibly send the fixes to you, not sure yet).  I can't help but reply to messages on this thread but I really need to get some homework done and thus resisting the urge to spend some time to figure out sub-version and google code



I would like qiang to make a comment on the table case issue before fixing it (I like table to be lower case).



I will try to figure out SVN before working on the skeleton anymore if I can help it



And I would like to remind everyone that the skeleton requires the current nightly version of Yii (if not the svn version)

Yep, PM me your E-mail and I'll add you as a owner. The fix i did for the database is easy to reverse if it's a bug. But from all the docs i read it uses uppercase. SVN shouldn't be too hard to figure out. PM me any questions you have.
0

#26 User is offline   mocapapa 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 428
  • Joined: 04-January 09
  • Location:Tokyo, JAPAN

Posted 15 February 2009 - 06:18 PM

Quote

Quote

For me it works with the tables as under-case... And I'm not sure why Yii is making the first letter capital, within the app all the tables are written in lower-case.



Could it be a mysql setting that turns on case-sensitivity?


I am not sure about that. Would some one please describe this case sensitivity?

One thing I can think of is that the original entry script seems to be for Windows; though I am using not WAMP but LAMP, this issue may come from Windows.

0

#27 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 15 February 2009 - 06:19 PM

Quote

One thing I can think of is that the original entry script seems to be for Windows; though I am using not WAMP but LAMP, this issue may come from Windows.

Nah, I'm using Ubuntu Linux with Apache2 and it does the same thing.
0

#28 User is offline   mocapapa 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 428
  • Joined: 04-January 09
  • Location:Tokyo, JAPAN

Posted 15 February 2009 - 08:05 PM

Quote

Quote

One thing I can think of is that the original entry script seems to be for Windows; though I am using not WAMP but LAMP, this issue may come from Windows.


Nah, I'm using Ubuntu Linux with Apache2 and it does the same thing.


Let me clarify again.

What I am saying is...
  • Linux(My situation):

        I have to change the table name 'user' to 'User'. There is a issue on the original code.
  • Windows(though I have not tested):

      Jonah seems to be OK for using the table 'user'. There is NOT an issue on the original code.


You are using Linux, there may be an issue. And I should have said "This case sensitibity may come from windows" instead.

Is this make sense?

0

#29 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 15 February 2009 - 08:11 PM

Quote

Let me clarify again.



What I am saying is...

  • Linux(My situation):

        I have to change the table name 'user' to 'User'. There is a issue on the original code.
  • Windows(though I have not tested):

      Jonah seems to be OK for using the table 'user'. There is NOT an issue on the original code.




You are using Linux, there may be an issue. And I should have said "This case sensitibity may come from windows" instead.



Is this make sense?

The thought is good but there shouldn't be a difference between mysql ran on linux or on Windows. It's still mysql. Just packaged up differently.
0

#30 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 15 February 2009 - 11:33 PM

I have finally figured out how to get google code to work for me (turns out I was already almost there).

I have the project up also at
http://code.google.c...ii-skeleton-app

So how should we do this?  Should we keep these projects separate or combine them?

(btw Bios Element  I would be more than glad to give you full access to my project if you like)

We may have different views about certain things, so if you want to stay separate I understand.  You may even keep an eye on my project and copy the modification over to your project as they come if you like.  Whatever you want to do.

BTW, is it possible to hide certain files from being re-uploaded to google even though they have been changed? It would be useful to do this for the index file which contains the path to Yii
0

#31 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 15 February 2009 - 11:40 PM

Quote

I have finally figured out how to get google code to work for me (turns out I was already almost there).



I have the project up also at

http://code.google.c...ii-skeleton-app



So how should we do this?  Should we keep these projects separate or combine them?



(btw Bios Element  I would be more than glad to give you full access to my project if you like)



We may have different views about certain things, so if you want to stay separate I understand.  You may even keep an eye on my project and copy the modification over to your project as they come if you like.  Whatever you want to do.



BTW, is it possible to hide certain files from being re-uploaded to google even though they have been changed? It would be useful to do this for the index file which contains the path to Yii


Well since some revisions and bug reports have already been made on the version I made, Why don't I give you owner access to that one. We can always make branches within the project If we need to. But I think we follow the same ideas. :)

And you can, It depends on what program your using for SVN and Since I don't really use Windows, I can't really help you with that. >.> But you can set a file to not be Revision Controlled.
0

#32 User is offline   mocapapa 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 428
  • Joined: 04-January 09
  • Location:Tokyo, JAPAN

Posted 16 February 2009 - 12:41 AM

Quote

The thought is good but there shouldn't be a difference between mysql ran on linux or on Windows. It's still mysql. Just packaged up differently.

All right, as I do not know much about WAMP, I just keep silent.
0

#33 User is offline   Maxximus 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 146
  • Joined: 24-November 08
  • Location:Spain

Posted 16 February 2009 - 07:20 AM

This seems to be quite nice, the only thing is that it might not be a good idea to have 2 branches already...

About the typecasting: Yes, there is an issue that Linux makes a difference in UC/LC, Windows does not. For the urls there is a solution: 'caseSensitive'=>false, but not for database tables.

Yii will always use tablenames with UCFirst. To get past that define the tablename in the model, but to be consistent please use 'Tablename' instead of 'tablename'.

[boring lecture mode]
So in general use the Yii standard notation (even if you don't agree with it), especially ppl developing in Windows/WAMP environments. If not, chances are your code won't work once uploaded to a Linux host.
[/boring lecture mode]
0

#34 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 16 February 2009 - 01:13 PM

Quote

This seems to be quite nice, the only thing is that it might not be a good idea to have 2 branches already...



About the typecasting: Yes, there is an issue that Linux makes a difference in UC/LC, Windows does not. For the urls there is a solution: 'caseSensitive'=>false, but not for database tables.



Yii will always use tablenames with UCFirst. To get past that define the tablename in the model, but to be consistent please use 'Tablename' instead of 'tablename'.



[boring lecture mode]

So in general use the Yii standard notation (even if you don't agree with it), especially ppl developing in Windows/WAMP environments. If not, chances are your code won't work once uploaded to a Linux host.

[/boring lecture mode]


Already? >.> No one is branching anything yet. But if there comes a feature or system that we disagree on, A Branch is simple enough to make.

Of course we're trying to use the Yii Convention, It's just kinda hard to figure out since I don't think it actually states UC anywhere in the docs. >.>

I'm opening another bug report on this and I'll go dig through and try to find all the lowercase declarations. Anyone who wants to help is more then welcome to do so. :)
0

#35 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 16 February 2009 - 01:22 PM

@Maxximus
Thanks for the clarification.  Unless qiang changes the convention I will change the tables to UC

@Bios Element

Quote

Well since some revisions and bug reports have already been made on the version I made, Why don't I give you owner access to that one. We can always make branches within the project If we need to. But I think we follow the same ideas. :)



And you can, It depends on what program your using for SVN and Since I don't really use Windows, I can't really help you with that. >.> But you can set a file to not be Revision Controlled.


We'll I already fixed the bugs in my SVN that were in yours + have some other things changed up.. I can also make you a "Project Owners" of it, not simply just a "project member". pm me if interested
0

#36 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,889
  • Joined: 04-October 08
  • Location:DC, USA

Posted 16 February 2009 - 01:34 PM

The convention for table names is just a recommendation. You may override this convention easily with the tableName() method.
0

#37 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 16 February 2009 - 01:37 PM

Quote

The convention for table names is just a recommendation. You may override this convention easily with the tableName() method.


Good to hear. But for a Skeleton app, It's probably best to keep things following convention so that it can be merged into existing projects by other devs easily.
0

#38 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 16 February 2009 - 01:48 PM

http://dev.mysql.com...ensitivity.html

You were right the case sensitivity is different across different OS.

I just tried to change the table name in my DB to uppercase but it is not letting me.

I did some research and it seems I have a setting (this is a default setting for windows) that does not allow for uppercase table names.

Instead of enforcing all windows users to change that setting, wouldn't it be better to change the Yii default to lowercase & encourage that instead?
0

#39 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 16 February 2009 - 01:53 PM

On windows the default is:

Quote

Table names are stored in lowercase on disk and name comparisons are not case sensitive. MySQL converts all table names to lowercase on storage and lookup. This behavior also applies to database names and table aliases.


On unix:

Quote

Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement. Name comparisons are case sensitive. Note that if you force this variable to 0 with --lower-case-table-names=0 on a case-insensitive file system and access MyISAM tablenames using different lettercases, index corruption may result.


on os x

Quote

Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons are not case sensitive. This works only on file systems that are not case sensitive! InnoDB table names are stored in lowercase, as for lower_case_table_names=1.

0

#40 User is offline   Bios Element 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 63
  • Joined: 13-February 09
  • Location:Ohio, USA

Posted 16 February 2009 - 02:09 PM

Quote

Instead of enforcing all windows users to change that setting, wouldn't it be better to change the Yii default to lowercase & encourage that instead?


Actually you have a point, I "think" Yii is the only framework using Uppercase and this might just be why. >.>
0

Share this topic:


  • (9 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users