Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty default values in create table #26

Closed
marcioqmaciel opened this issue Jan 13, 2016 · 4 comments
Closed

Empty default values in create table #26

marcioqmaciel opened this issue Jan 13, 2016 · 4 comments

Comments

@marcioqmaciel
Copy link

Hi Erik

VS Community 2015 Update 1 + SQLCEToolbox 4.4.0.4 + db CE4.0
Build Table (beta) + field with default value

SQL generated with empty default value:

-- Script Date: 13/01/2016 10:55 - ErikEJ.SqlCeScripting version 3.5.2.56
CREATE TABLE Faucet (
[Id] int IDENTITY (1,1) NOT NULL
, [Guid] uniqueidentifier DEFAULT NOT NULL
, [Nome] nvarchar(100) NOT NULL
, [Endereco] nvarchar(255) NOT NULL
, [DataCadastro] datetime DEFAULT NOT NULL
, [DataUltimaAnalise] datetime NULL
, [DataUltimoAcesso] datetime NULL
, [DataProximoAcesso] datetime DEFAULT NOT NULL
, [RecompensaMinima] smallint NULL
, [UltimaRecompensa] smallint NULL
, [Saldo] int NULL
, [EntregaRecompensa] tinyint DEFAULT NOT NULL
, [Rede] tinyint DEFAULT NOT NULL
, [Moeda] tinyint DEFAULT NOT NULL
, [IntervaloTempo] smallint NULL
, [DetectarIntervalo] bit DEFAULT NOT NULL
, [DetectarRecompensa] bit DEFAULT NOT NULL
, [DetectarSaldo] bit DEFAULT NOT NULL
, [DetectarSaque] bit DEFAULT NOT NULL
, [Avaliacao] tinyint DEFAULT NOT NULL
, [AvisarTempo] bit DEFAULT NOT NULL
, [Idioma] tinyint DEFAULT NOT NULL
, [ManterAberto] bit DEFAULT NOT NULL
, [Observacoes] ntext NOT NULL
, [PrecisaVerificar] bit DEFAULT NOT NULL
, [Problemas] nvarchar(255) NULL
, [TemFundo] bit DEFAULT NOT NULL
, [TemLogin] bit DEFAULT NOT NULL
, [TemProblemas] bit DEFAULT NOT NULL
, [TemReferido] bit DEFAULT NOT NULL
, [TesteHumano] smallint DEFAULT NOT NULL
);
GO
ALTER TABLE [Faucet] ADD CONSTRAINT [PK_Faucet] PRIMARY KEY ([Id]);
GO

My default values in Build Table: NEWID(), GETDATE() and 0 / 1.

Hugs.

@ErikEJ
Copy link
Owner

ErikEJ commented Jan 13, 2016

Hi, I think this is fixed in the latest "daily" build: https://sqlcetoolbox.codeplex.com/releases/view/618303

Bug: Table builder was not scripting default values

Please let me know if that fixes it for you.

@marcioqmaciel
Copy link
Author

Hi @ErikEJ

Yes, "default value" fixed in build 4.4.0.12.

Tks a lot.

@ErikEJ ErikEJ closed this as completed Jan 17, 2016
@marcioqmaciel
Copy link
Author

Hi @ErikEJ

VS Community 2015 Update 1 + SQLCEToolbox 4.4.0.12 + db CE4.0
Edit column (Beta) + field WITHOUT default value:

ALTER TABLE [teste] ALTER COLUMN [Col] nvarchar(25) DEFAULT NULL ;

Edit column (beta) + field WITH default value is ok:
ALTER TABLE [teste] ALTER COLUMN [val] int DEFAULT 1 NOT NULL ;

Hugs

@ErikEJ ErikEJ reopened this Jan 18, 2016
@ErikEJ
Copy link
Owner

ErikEJ commented Jan 19, 2016

Thanks for reporting, will be fixed in next daily/release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants