Skip to content

how can i define unsigned column? #438

Closed

Description

@ziaenezhad
No description provided.

Activity

  1. changed the title [-]how can i defined unsigned column?[/-] [+]how can i define unsigned column?[/+] on May 1, 2017
  2. pleerock commented on May 2, 2017

    @pleerock
    Member

    custom column types are not supported yet. But its planned in the future

  3. pleerock commented on Jun 17, 2017

    @pleerock
    Member

    All database specific column types are supported now since 0.1.0-alpha.10

  4. jonathan-palumbo commented on Jan 19, 2018

    @jonathan-palumbo

    @pleerock How exactly is this achieved? I can not seem to find any documentation or property in the ColumnOptions interface for defining an unsigned column?

  5. apasare commented on Jan 27, 2018

    @apasare

    @pleerock i'm wondering the same, how do i get typeorm to generate the following migration code id INT UNSIGNED NOT NULL AUTO_INCREMENT

  6. vkosachev commented on Feb 28, 2018

    @vkosachev
    Contributor

    Are there any workarounds on this ?

  7. added this to the 0.2.0 milestone on Mar 28, 2018
  8. AlexMesser commented on Mar 30, 2018

    @AlexMesser
    Collaborator

    UNSIGNED and ZEROFILL attributes avaliable from [email protected]. You can try it via npm i typeorm@next. Usage:

    @Entity()
    export class Post {
    
        @PrimaryColumn({ unsigned: true })
        id: number;
    
        @Column({ zerofill: true })
        num: number;
    
    }
  9. 0x0-x-0x0 commented on Apr 10, 2018

    @0x0-x-0x0
    Contributor

    @AlexMesser
    I want to add UNSIGNED attribute on PrimaryGeneratedColumn decorated property but it's not supported right?

  10. AlexMesser commented on Apr 11, 2018

    @AlexMesser
    Collaborator

    @d-yokoi yep, I forgot to add it in PrimaryGeneratedColumn options. You can solve it by using @PrimaryColumn({ unsigned: true }) and @Generated() decorators as hotfix. I'll add this in the next release.

  11. AlexMesser commented on Apr 12, 2018

    @AlexMesser
    Collaborator

    fixed and released in [email protected]. You can try it via npm i typeorm@next.

  12. 0x0-x-0x0 commented on Apr 15, 2018

    @0x0-x-0x0
    Contributor

    Thank you! I'll use it.

  13. added a commit that references this issue on Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions