I like these. Yes, we need to have these in aiki core. Also, jakub, if
you look at the default fields in the db, there are way too many.
Would be great to simplify future aiki sites going forward to only
have minimal fields...

On Tue, Mar 15, 2011 at 8:36 AM, Jakub Jankiewicz
<735...@bugs.launchpad.net> wrote:
> line breaks
>
> ** Description changed:
>
>  There should be separate login history
>
>  aiki_login (id INTEGER auto_increment,  userid, time datetime, ip
>  BIGINT)
>
>  +--------------+                     +------------------+
>  |  aiki_users  | 1-----------------M |   aiki_logins    |
>  +--------------+                     +------------------+
> -
> -
> - best way to store IP adresses is user Integer and INET_ATON INET_NTOA 
> functions.
> +
> + best way to store IP adresses is user Integer and INET_ATON INET_NTOA
> + functions.
>
>  Optimized aiki_users
>
> - aiki_users(userid, username, full_name, password, usergroup, email, avatar, 
> homepage,
> - maillist, randkey, is_active, exclude_tags, nsfwfilter)
> -
> + aiki_users(userid, username, full_name, password, usergroup, email,
> + avatar, homepage, maillist, randkey, is_active,
> + exclude_tags, nsfwfilter)
>
>  logins_number
>
> - select count(*) from aiki_logins, aiki_users where
> - aiki_logins.userid = aiki_users.userid
> + select count(*) from aiki_logins, aiki_users
> + where aiki_logins.userid = aiki_users.userid
>
>  users_permistions is redundant there is
>
> - select group_permissions from aiki_users_groups, aiki_users where
> - aiki_users.usergroup = aiki_users_group.id
> + select group_permissions from aiki_users_groups, aiki_users where
> +        aiki_users.usergroup = aiki_users_group.id
>
>  num_upload — redundant
>
>  I don't how about the core but in openclipart.org you can do this:
>
> - select count(*) from aiki_users, ocal_files whre
> - aiki_users.userid = ocal_files.upload_user
> + select count(*) from aiki_users, ocal_files
> + where aiki_users.userid = ocal_files.upload_user
>
>  exclude_tags — (What is this used for?) if aiki need file tags:
>
>  aiki_tags (id INTEGER auto_increment, name VARCHAR(100))
>
> - aiki_file_tags (id INTEGER auto_increment, fileid INTEGER, tagid INTEGER 
> REFERENCES aiki_tags(id) )
> -
> -
> -
> -
> -
> - country, sex and job should should be in aiki_user_fields and aiki_fields
> + aiki_file_tags (id INTEGER auto_increment, fileid INTEGER,
> + tagid INTEGER REFERENCES aiki_tags(id) )
> +
> + country, sex and job should should be in aiki_user_fields and
> + aiki_fields
>
>  aiki_fields(id, name)
>
> - aiki_user_fields(id INTEGER auto_increment, fields_id INTEGER REFERENCES 
> aiki_fields(id),
> - userid INTEGER REFERENCES aiki_users(userid))
> + aiki_user_fields(id INTEGER auto_increment,
> + fields_id INTEGER REFERENCES aiki_fields(id),
> + userid INTEGER REFERENCES aiki_users(userid))
>
>  aiki_fileds:
>
>  0 email
>  1 sex
>  2 country
>
>  and user be able to add new fileds.
> -
>
>  +--------------+                     +------------------+
>  |  aiki_users  | 1-----------------M | aiki_user_fileds |
>  +--------------+                     +------------------+
>  M
>  |
>  |
>  |
>  1
>  +------------------+
>  |    aiki_fileds   |
>  +------------------+
>
> -
> -
>  if AIKI handle upload there should be aiki_files
>
>  +--------------+                     +------------------+
>  |  aiki_users  | 1-----------------M |    aiki_files    |
>  +--------------+                     +------------------+
>  1
>  |
>  |
>  |
>  M
>  +------------------+
>  |  aiki_file_tags  |
>  +------------------+
>  M
>  |
>  |
>  |
>  1
>  +------------------+
>  |    aiki_tags     |
>  +------------------+
>
> --
> You received this bug notification because you are subscribed to
> aikiframework.
> https://bugs.launchpad.net/bugs/735470
>
> Title:
>  Dabase optimization needed
>


-- 
Jon Phillips
http://rejon.org/ | http://fabricatorz.com/
chat/skype: kidproto | irc: rejon
+1.415.830.3884 (global) | +1-510-499-0894 (sf)

-- 
You received this bug notification because you are a member of Aiki
Framework Admins, which is subscribed to aikiframework.
https://bugs.launchpad.net/bugs/735470

Title:
  Dabase optimization needed

Status in Aiki Framework:
  New

Bug description:
  There should be separate login history

        aiki_login (id INTEGER auto_increment,  userid, time datetime,
  ip BIGINT)

  +--------------+                     +------------------+
  |  aiki_users  | 1-----------------M |   aiki_logins    |
  +--------------+                     +------------------+

  best way to store IP adresses is user Integer and INET_ATON INET_NTOA
  functions.

  Optimized aiki_users

        aiki_users(userid, username, full_name, password, usergroup, email, 
                   avatar, homepage, maillist, randkey, is_active, 
                   exclude_tags, nsfwfilter)

  logins_number

        select count(*) from aiki_logins, aiki_users
        where aiki_logins.userid = aiki_users.userid

  users_permistions is redundant there is

         select group_permissions from aiki_users_groups, aiki_users where 
         aiki_users.usergroup = aiki_users_group.id

  num_upload — redundant

  I don't how about the core but in openclipart.org you can do this:

        select count(*) from aiki_users, ocal_files
        where aiki_users.userid = ocal_files.upload_user

  exclude_tags — (What is this used for?) if aiki need file tags:

         aiki_tags (id INTEGER auto_increment, name VARCHAR(100))

         aiki_file_tags (id INTEGER auto_increment, fileid INTEGER,
                         tagid INTEGER REFERENCES aiki_tags(id) )

  country, sex and job should should be in aiki_user_fields and
  aiki_fields

  aiki_fields(id, name)

  aiki_user_fields(id INTEGER auto_increment,
                   fields_id INTEGER REFERENCES aiki_fields(id),
                   userid INTEGER REFERENCES aiki_users(userid))

  aiki_fileds:

    0 email
    1 sex
    2 country

  and user be able to add new fileds.

  +--------------+                     +------------------+
  |  aiki_users  | 1-----------------M | aiki_user_fileds |
  +--------------+                     +------------------+
                                                M
                                                |
                                                |
                                                |
                                                1
                                       +------------------+
                                       |    aiki_fileds   |
                                       +------------------+

  if AIKI handle upload there should be aiki_files

  +--------------+                     +------------------+
  |  aiki_users  | 1-----------------M |    aiki_files    |
  +--------------+                     +------------------+
                                                1
                                                |
                                                |
                                                |
                                                M
                                       +------------------+
                                       |  aiki_file_tags  |
                                       +------------------+
                                                M
                                                |
                                                |
                                                |
                                                1
                                       +------------------+
                                       |    aiki_tags     |
                                       +------------------+

_______________________________________________
Mailing list: https://launchpad.net/~aikiframework.admins
Post to     : aikiframework.admins@lists.launchpad.net
Unsubscribe : https://launchpad.net/~aikiframework.admins
More help   : https://help.launchpad.net/ListHelp

Reply via email to